摘要:
* { margin: 0; padding: 0; } /** 斜体文字不倾斜 */ em, i { font-style: normal; } /** 无序列表去掉· */ li { list-style: none; } /** 图片和文字垂直居中,并且边框为0 */ img { border 阅读全文
摘要:
<head> <meta charset="UTF-8"> <title>11分页插件样式</title> <style> .page a, .prev-page, .next-page { display: inline-block; width: 36px; height: 36px; back 阅读全文
摘要:
.box { margin: 20px auto; width: 800px; height: 800px; } ul li { position: relative; float: left list-style: none; width: 150px; height: 300px; border 阅读全文
摘要:
white-space: 1、normal默认换行 2、nowrap强制一行,会溢出 单行溢出显示省略号 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; // 溢出显示省略号 } 多行溢出显示省略号:(有兼容性问题, 阅读全文
摘要:
原因是:图片和文字是基线对齐,就是有些文字的比如q这个字母实际上是超过最底下一点点 解决: 1、将图片转成display:block 2、用vertical-align: middle/top/bottom调整垂直对齐方式 阅读全文
摘要:
{ vertical-align: middle; } 阅读全文
摘要:
.without-outline { outline: none; } .forbid-resize { outline: none; resize: none; } 阅读全文
摘要:
.small-triangle { width: 0; height: 0; border: 10px solid transparent; border-bottom-color: pink; } 斜三角梯形: .oblique-angle { width: 0; height: 0; borde 阅读全文
摘要:
原理:利用移动背景图片的位置,只展示图片的可视部分 作用:减少图片资源的请求次数,节约网络开销。一般针对那些不会变化的小的背景图。 阅读全文
摘要:
1、将高度或者宽度设置成0,好处是能不通过js操作dom,让别的元素占掉这个元素的宽度或者高度 2、display:none,好处同上 3、visibility:hidden,即使看不见,还是会占有位置 4、overflow: a)hidden,溢出隐藏 b)visible,默认显示 c)scrol 阅读全文