随笔分类 -  css

描述一些css遇到的不太正常,按逻辑应该出现预定效果却没达预定效果的问题
如何让浏览器直接输出HTML代码而不解析
摘要:方法一: 将HTML代码嵌入到<script type='text/html' style='display:block'></scipt>中 <script type='text/html' style='display:block'> <input type="text" /> </scipt> 阅读全文

posted @ 2017-01-10 10:41 devilkin_wang 阅读(5848) 评论(0) 推荐(0)

CSS3中:nth-child和:nth-of-type的区别深入理解。 关于:nth-child和:nth-of-type的区别之前一直没太注意,经深入理解才发现里面其实暗藏玄机
摘要:关于:nth-child和:nth-of-type的区别之前一直没太注意。最近打算深入了解一些CSS3,才发现里面其实暗藏玄机。 :nth-child可以选择父元素下的字元素,:nth-of-type也可以。但是它们到底有什么区别呢? 其实区别很简单::nth-of-type为什么要叫:nth-of 阅读全文

posted @ 2016-12-22 15:15 devilkin_wang 阅读(332) 评论(0) 推荐(0)

span标签设置margin-top没有效果
摘要:<span>是行内元素,span只有margin-left和margin-right才有效果。要想margin-top生效就要把span转给块级元素才行。在span的css中加入以下属性即可 span是行内元素,margin只有左右,不能设置上下的margin. 阅读全文

posted @ 2016-12-12 09:42 devilkin_wang 阅读(2232) 评论(0) 推荐(0)

导航