国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

純CSS制作各種各樣的網頁圖標(三角形、暫停按鈕、下載箭頭、

2024-07-11 08:31:49
字體:
來源:轉載
供稿:網友

三角形

<div class="box"></div><style>.box{ width: 0; height: 0; border-top: 50px solid transparent; border-bottom: 50px solid transparent; border-left: 50px solid transparent; border-right: 50px solid red;}</style>

平行四邊形圖標

<div class="box"></div><style> .box{ width: 50px; height: 50px; margin: 100px auto; background-color: red; transform: skew(-25deg); }</style>

暫停按鈕

<div class="box"></div> <style> .box{ width: 50px; height: 50px; margin: 100px auto; color: #000; border: 1px solid; border-radius: 50%; outline: 10px solid; outline-offset: -26px; } </style>

暫停按鈕的實現原理就是邊框用border,里面的正方形用outline。因為outline有一個offset屬性可以用來設置偏移量,并且是按照比例來的。

其實如果再將outline-offset的值設置小一點,一個加好就出來了

加號

<div class="box"></div><style> .box{ width: 50px; height: 50px; margin: 100px auto; color: #000; border: 1px solid; border-radius: 50%; outline: 10px solid; outline-offset: -35px; }</style>

如果再將其旋轉,就變成了一個關閉按鈕

關閉按鈕

<div class="box"></div><style> .box{ width: 50px; height: 50px; margin: 100px auto; color: #000; border: 1px solid; border-radius: 50%; outline: 10px solid; outline-offset: -35px; transform: rotate(45deg); }

漢堡按鈕

<div class="box"></div><style> .box{ width: 50px; height: 0px; margin: 100px auto; box-shadow: 36px 10px 0 3px red, 36px 0 0 3px red, 36px 20px 0 3px red; }</style>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 永福县| 马公市| 禹城市| 景德镇市| 尚志市| 富蕴县| 蚌埠市| 镇宁| 澎湖县| 安徽省| 晋城| 扎鲁特旗| 五大连池市| 石台县| 慈利县| 建湖县| 尼勒克县| 定结县| 长汀县| 昌吉市| 上林县| 临西县| 徐汇区| 漳平市| 星子县| 德庆县| 青神县| 罗源县| 祁门县| 诸城市| 新郑市| 黄冈市| 晋江市| 涿州市| 沅江市| 青海省| 蒙阴县| 双峰县| 罗山县| 甘泉县| 永川市|