CSS
虬川候
如果有用请赞一下,没用请留言告诉我版本和情况
展开
-
flex
1. 用display: flex;定义元素为flex 2. 用flex-direction定义主轴 注意: 下面默认主轴为x轴 flex-direction 属性(默人row) row 从左上往右 row-reverse 从右上往左 column 从左上往下 column-reverse 从左下往上 3. 用flex-wrap定义是否换行 超出父元素宽才会换行 flex-wrap 属性(默人nowrap) nowrap 不换行超出自.原创 2021-05-21 10:50:35 · 39 阅读 · 0 评论 -
单行多行超出省略
单行省略 overflow: hidden; white-space: nowrap; text-overflow: ellipsis; 多行省略 display: -webkit-box !important; overflow: hidden; text-overflow: ellipsis; word-break: break-all; -webkit-box-orient: vertical; -webkit-line-clamp: 2; ...原创 2021-05-21 10:47:34 · 38 阅读 · 0 评论 -
media缩小后居中
@media only screen and (min-width: 0px) and (max-width: 1465px) { .main-bg { left: 50%; transform: translate(-50%,0) scale(.8); } }原创 2021-05-21 10:43:12 · 71 阅读 · 0 评论 -
CSS样式重置
@charset "utf-8";html{background-color:#fff;color:#000;font-size:12px} body,ul,ol,dl,dd,h1,h2,h3,h4,h5,h6,figure,form,fieldset,legend,input,textarea,button,p,blockquote,th,td,pre,xmp{margin:0;padding...原创 2018-11-16 09:49:00 · 317 阅读 · 0 评论 -
移动端多倍屏1px问题解决样式
@charset "utf-8"; .border, .border-top, .border-right, .border-bottom, .border-left, .border-topbottom, .border-rightleft, .border-topleft, .border-rightbottom, .border-topright, .border-bottomleft {...原创 2018-11-16 09:50:44 · 276 阅读 · 0 评论