html - 这种图形如何用css3写
问题描述

问题解答
回答1:css3里面有个名为倒角的干活
回答2:<!DOCTYPE html><html lang='en'><head> <meta charset='UTF-8'> <title>Document</title></head><body><style type='text/css'> *,body{ margin: 0; padding: 0; background: #fff; border: none; } .bg{width: 500px; height: 500px; background: rgba(253,181,43,1); padding: 12px; } .bg .write_box{ width: 500px; height: 250px; position: relative;background: #fff; overflow: hidden; } .bg .write_box .round{ width: 40px; height: 40px; background: rgba(253,181,43,1); position:absolute; border-radius: 100% } .bg .write_box .lft{ left: -20px; } .bg .write_box .rgh{ right: -20px; } .bg .write_box .botm{ bottom: -20px; } .bg .write_box .tp{ top: -20px; }</style> <p class='bg'> <p class='write_box'> <p class='round lft tp'></p> <p class='round rgh tp'></p> <p class='round lft botm'></p> <p class='round rgh botm'></p> </p> <p class='write_box'> <p class='round lft tp'></p> <p class='round rgh tp'></p> <p class='round lft botm'></p> <p class='round rgh botm'></p> </p> </p></body></html>回答3:
简单来讲,你需要通过 圆形p元素的border-radius 和 包裹的overflow来实现,至于更深的橘色应该是阴影
回答4:真是不好意思,我一直用的firefox,没想到它对于radial-gradient和chrome还是有不同的。也是我自己理解不够。
我又修改了下面的链接。
===============
使用了CSS3变量来控制半径大小,暂时想不到更简单的办法了在不向下不兼容的路上越走越远...
DEMO-New
===================================
详细请看DEMO,纯CSS3实现,没有添加额外标记,虽然我感觉可扩展性不高,不过继续改善应该还是可以投入生产中的。
CSS3的魔法还有很多,不断地深入思考,会想到很多有趣的功能。正如《CSS揭秘》作者那样。
DEMO
相关文章:
1. javascript - 求解答:实例对象调用constructor,此时constructor内的this的指向?2. Windows系统能否利用Docker使用Ubuntu吗?Ubuntu能使用本机的显卡吗?3. python的MySQLdb库中的executemany方法如何改变默认加上的单引号?4. python中生产者消费者线程问题5. html5 - 在一个页面中 初始了两个swiper 不知道哪里错了 一直不对6. css - chrome浏览器input记录上次cookie信息后,有个黄色背景~如何去除!7. mysql5.7就没有官方性质的详细配置文件吗?求大神告知8. 请教,关于python字典,合并相同值的键的实现方法9. android - 京东移动端网页和其app加载的url所做的呈现不应该是完全一样的吗?10. css3中translate(-50%,-50%)对 transform-origin的奇葩影响?

网公网安备