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 - 关于jsp中嵌入js代码的问题2. javascript - 百度坐标,返回目标附近有哪些坐标3. PHP类中的$this4. javascript - html5多个label中其中一个触发change,如何判断是哪一个出发了change5. angular.js - angurlarJS的安卓的微信端中用加载ngCookies会出错的问题6. clone - git sourceTree克隆仓库时,都不停弹出Password Required弹窗,即时输入正确的git账号密码还是弹出7. python - 怎么通过vpn连内网ftp?8. javascript - 一个JS多元运算符的问题9. javascript - 关于fullpage.js的横向滚动控制10. python 正则表达式提取

网公网安备