当前位置: 首页 > news >正文

CSS实现内凹圆角,从而实现圆角边框

1、代码

<!DOCTYPE html>
<html><head><style>.uu {position: relative;width: 400px;height: 300px;}img {width: 100%;height: 100%;z-index: 1;}.box_right_top {background-image: radial-gradient(circle at left bottom, transparent 50px, white 0);position: absolute;top: 0;right: 0;z-index: 2;width: 50px;height: 50px;}.box_left_top {background-image: radial-gradient(circle at right bottom, transparent 50px, white 0);position: absolute;top: 0;left: 0;z-index: 2;width: 50px;height: 50px;}.box_right_bottom {background-image: radial-gradient(circle at left top, transparent 50px, white 0);position: absolute;bottom: 0;right: 0;z-index: 2;width: 50px;height: 50px;}.box_left_bottom {background-image: radial-gradient(circle at right top, transparent 50px, white 0);position: absolute;bottom: 0;left: 0;z-index: 2;width: 50px;height: 50px;}</style>
</head><body><div class="uu"><img src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" /><div class="box_right_top"></div><div class="box_right_bottom"></div><div class="box_left_top"></div><div class="box_left_bottom"></div></div>
</body></html>

2、原理

使用了radial-gradient属性

3、效果图

 

http://www.lryc.cn/news/140125.html

相关文章:

  • Spring中的自定义注解
  • 前端需要理解的设计模式知识
  • 1、攻防世界第一天
  • 分布式事务(7):SpringCloud2.0整合LCN
  • 机器学习实战14-在日本福岛核电站排放污水的背景下,核电站对人口影响的分析实践
  • 4G智慧电力物联网:建设高效智能,引领电力行业革新!
  • 安防视频监控平台EasyCVR视频集中存储平台接入RTSP设备出现离线情况的问题解决方案
  • 达梦数据库分区表介绍
  • Python爬虫库之urllib使用详解
  • SpringCloud学习笔记(八)_使用Apollo做配置中心
  • jvs-rules(规则引擎)更新:新增功能介绍
  • 消息队列的消息异常处理
  • APP上线为什么要提前部署安全产品呢?
  • SQL注入之HTTP头部注入
  • 软考高级系统架构设计师系列论文九十七:论软件三层结构的设计
  • 【C++心愿便利店】No.2---函数重载、引用
  • 掌握Six Sigma:逐步解锁业务流程优化的秘密之匙
  • Python中使用print()时如何实现不换行
  • WordPress使用子主题插件 Child Theme Wizard,即使主题升级也能够保留以前主题样式
  • 人员跌倒检测识别预警
  • C#,《小白学程序》第二课:数组与排序
  • 2023有哪些更好用的网页制作工具
  • Keepalived(一)
  • cs231n assignment3 q5 Self-Supervised Learning for Image Classification
  • 电商首屏设计
  • SpringBoot集成Redis
  • qt 的基础学习计划列表
  • CSS中如何改变鼠标指针样式(cursor)?
  • SpringMVC-2-Spring MVC拦截器详解:从入门到精通
  • 探索AIGC人工智能(Midjourney篇)(一)