国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

html - 這種圖形如何用css3寫

瀏覽:127日期:2023-06-19 11:39:13

問題描述

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

標簽: HTML
相關文章:
主站蜘蛛池模板: 广汉市| 枣阳市| 蓬溪县| 桐梓县| 军事| 新绛县| 永修县| 榆树市| 布拖县| 房产| 榆中县| 三穗县| 昌邑市| 慈利县| 浑源县| 宁晋县| 阿拉善盟| 修水县| 康马县| 贵港市| 新巴尔虎右旗| 庆阳市| 霸州市| 塔河县| 枣阳市| 磐安县| 绥德县| 章丘市| 威宁| 丰城市| 枣阳市| 长春市| 台山市| 观塘区| 沙河市| 塘沽区| 武穴市| 临猗县| 介休市| 龙州县| 茂名市|