![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
CSS技巧
文章平均质量分 65
css开发常用
零度碳酸-
“前端小白”求知若渴,日常学习总结
展开
-
修改input与textarea的placeholder样式
修改input placeholder::-webkit-input-placeholder { color: red; font-size: 20px; font-weight: bolder;}修改textarea:textarea::-webkit-input-placeholder {color: #ddd;text-align: right;}修改 textarea 光标颜色textarea {vertical-align: baseline;car原创 2020-06-12 13:51:18 · 1370 阅读 · 0 评论 -
css实现一个元素水平垂直居中常用方法
法1.绝对定位元素的居中实现margin<style> .box { width: 100px; height: 100px; background: #c33; position: absolute; top: 50%; left: 50%; margin-top: -50px; /*高度的一半*/ margin-left: -50px; /*宽度的一半*/ }</s原创 2020-05-18 10:01:08 · 187 阅读 · 0 评论 -
清除浮动常见方法
为什么需要清除浮动?父级没有高度子盒子浮动了影响下面布局了1. :after 伪元素法.clearfix:after { content:"", display:block, height:0, clear:both, visibility:hidden}.clearfix { /* IE6、7专有*/ *zooom:1;}2. 双伪元素清除浮动....原创 2020-04-30 20:14:48 · 1083 阅读 · 0 评论 -
快速写一个三角
.single { width: 0; height: 0; line-height: 0; font-size: 0; border-top: 10px solid red; border-right: 10px solid green; border-bottom: 10px solid blue; border-left: 10px solid #000;...原创 2020-04-16 23:00:36 · 116 阅读 · 0 评论 -
解决ios无限滚动卡顿问题
解决ios无限滚动卡顿问题-webkit-overflow-scrolling: touch;原创 2019-10-09 15:16:52 · 258 阅读 · 0 评论 -
溢出的文字省略号显示
**文本超出两行溢出显示 ...** overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; word-wrap:break-word; //...原创 2019-10-09 15:21:52 · 2085 阅读 · 0 评论