随笔分类 -  CSS

页面样式
摘要:-webkit-font-smoothing: antialiased; 阅读全文
posted @ 2017-03-26 00:28 xuanPhoto 编辑
摘要:.classstyle{ -webkit-text-size-adjust:none; font-size:9px;} 阅读全文
posted @ 2017-03-23 23:53 xuanPhoto 编辑
摘要:因为单词不会像汉字一样根据盒子设定的宽度来自动换行, 所以加上这个属性可以让它像汉字一样随着盒子的宽度来换行 word-wrap:break-word; 或者word-break:break-all;区别在于单词是否会被截取换行, 比如200px的盒子到200px了肯定会换行的,所以换行的方式就是区别所在 阅读全文
posted @ 2017-03-15 21:12 xuanPhoto 阅读(301) 评论(0) 推荐(0) 编辑
摘要:子元素盒子居中,flex属性加在父元素身上,而不是自身 <div class="imgBox"> <img src="" alt="" style="width: 100px; height: 100px" /> <div style="margin: 0 0 0 10px">取代float</di 阅读全文
posted @ 2017-02-23 20:54 xuanPhoto 阅读(276) 评论(0) 推荐(0) 编辑
摘要:@charset "UTF-8"; /**css初始化**/ body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, te 阅读全文
posted @ 2016-12-08 14:41 xuanPhoto 阅读(257) 评论(0) 推荐(0) 编辑
摘要:颜色模式 圆角 盒子投影 文字投影 背景图固定 背景图尺寸 模糊背景 阅读全文
posted @ 2016-12-07 16:11 xuanPhoto 阅读(205) 评论(0) 推荐(0) 编辑
摘要:css html 阅读全文
posted @ 2016-12-07 13:08 xuanPhoto 阅读(160) 评论(0) 推荐(0) 编辑
摘要:1px边框在iPhone高清屏下,其实会变成2个物理像素的边框。 注意 给的元素本身要 相对定位 position: relative; 阅读全文
posted @ 2016-12-07 12:46 xuanPhoto 阅读(605) 评论(0) 推荐(1) 编辑
摘要:本案例以实现侧边栏的效果为例来说明 直接上代码看效果: css html 利用name像id,class那样是元素都可以添加的特征,然后利用attr在css里来添加属性,再让其在:after里面进行添加内容为文字 这种运用方式很巧妙 阅读全文
posted @ 2016-12-04 10:57 xuanPhoto 阅读(474) 评论(0) 推荐(0) 编辑
摘要:这是我无意中发现的,先记录下 比如你在一个h1标签里面添加文字,或者在其他块级标签添加文字,想让他们间隙少一点,(基线影响)可把行高设置为line-height: 1;就达到消除基线的作用。 建议使用font-size: 0;然后再给他的子元素重新给字体大小 阅读全文
posted @ 2016-11-29 15:30 xuanPhoto 阅读(329) 评论(0) 推荐(0) 编辑
摘要:li:not(:last-child){border-right: 1px dashed black;} 选择全部排除最后一项 li:not(:first-child) { }选择全部排除第一项 li:last-of-type{background-color: red;} 选择li中最后一项 li 阅读全文
posted @ 2016-11-23 21:09 xuanPhoto 阅读(170) 评论(0) 推荐(0) 编辑
摘要:字体设置由来对应说明 阅读全文
posted @ 2016-11-23 21:03 xuanPhoto 阅读(209) 评论(0) 推荐(0) 编辑
摘要:超出一行用...代替 超出多行用...代替 这里以两行来展现效果 阅读全文
posted @ 2016-11-23 20:59 xuanPhoto 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-11-23 20:58 xuanPhoto 阅读(205) 评论(0) 推荐(0) 编辑
摘要:@charset "utf-8"; /* 禁用iPhone中Safari的字号自动调整 */ html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-touch-callout: none; /* iOS 阅读全文
posted @ 2016-11-23 20:56 xuanPhoto 阅读(407) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示