
HTML + CSS
html css
01_Carrortwhisker
My future in your hands so i'm beggin.
展开
-
使用CSS绘制三角形与平行四边形
transform语法: transform: none|transform-functions; RUNOOB.COM文档 使用transparent还要注意兼容性问题,如果不支持想要向下兼容还是要用图片来实现的。 三角形 将width height设置为0,图形的大小是由border来控制的。具体位置自己再配合需求调整一下。 .triangle { position: absolute; width: 0; height: 0;原创 2021-06-21 14:47:28 · 253 阅读 · 0 评论 -
CSS:not() 选择器排除不想添加样式的元素(如第一个或最后一个,或特定元素)
css的:not()选择器可用将不想添加的个别元素分离出来,例: 为除了p元素以外的所有元素添加样式: 类名:not(p) { width: 80%; } 选择第一个或最后一个子元素: 类名:not(:first-child) { width: 80%; } 类名:not(:last-child) { width: 80%; } 组合使用 .类名:not(:last-child):after { width:80% } .类名:not(:first-child):not(:la原创 2021-07-22 22:44:32 · 5092 阅读 · 0 评论