css技巧
大力酱
这个作者很懒,什么都没留下…
展开
-
纯css制作三角形+常用的对话框实例
网页中经常用到三角形的地方,用css写三角形的方法很简单 html: css: .u-tri{ display: inline-block; border-top: 20px solid transparent; border-bottom: 20px solid transparent; border-lef原创 2017-05-31 10:35:49 · 5425 阅读 · 1 评论 -
设置placeholder样式
浏览器默认情况下,placeholder的颜色、大小和input的样式一致,但有时想要设定浅一点的颜色用于区分当前是否是用户输入的内容。 :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: #999; } ::-moz-placeholder { /* Mozilla Firefox 19+ */ color: #99原创 2017-07-13 15:36:41 · 572 阅读 · 0 评论 -
解析css中的两种盒模型
css里的盒模型分两种,w3c标准盒模型和ie盒模型(ie6以下)。 ①w3c盒子元素所占空间大小 = 内容 + padding + border + margin; 对应box-sizing:content-box ②ie盒模型元素所占空间大小 = 内容 + margin;其中内容包含(内容、padding、border) 对应box-sizing: border-box 例子:将一个原创 2017-08-01 10:13:40 · 633 阅读 · 0 评论 -
经典面试题:一栏定宽,另一栏自适应,且等高
html: 你订单咋咋十号是好的多多多多多多多多多多多多多多多多多多多多多多多多多多多多 苟富贵 css: .wrapper { overflow: hidden; } .left { float: left; width: 200px; background-color: red; margin-bottom: -3000px; pad原创 2017-10-24 16:27:15 · 318 阅读 · 0 评论