
css3
Zhencode
人生没有成败,凡事正面思考
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
css设置文本两行后显示省略
p{ display: -webkit-box;//设置盒子属性 text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis;//...显示 -webkit-line-clamp: 2; line-clamp: 2;//显示两行 -webkit-box-orient: vertical;文本方向 }原创 2020-06-12 20:33:09 · 360 阅读 · 0 评论 -
jquery根据类名或标签获取子元素
<!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script> <scri原创 2020-06-12 17:26:56 · 8611 阅读 · 0 评论 -
flex弹性盒子使用
1.设置flex后,子元素的flaot,clear,vertical-align失效 2.方向:flex-direction 3.盒子尺寸:box-sizing 4.是否换行:flex-wrap 5.flex-flow:direction | wrap 6.主轴设置属性:justify-content 7.侧轴设置属性:align-items 8.align-content:侧轴多个子元素排放方式...原创 2019-11-20 10:22:07 · 175 阅读 · 0 评论 -
css解决像素一边框问题
父元素引用 &::before{ content:''; position: absolute;left: 0;top: 0;width: 200%;height: 200%;transform: scale(0.5,0.5); transform-origin: left top;border: 1px solid red;box-sizing: border-box; }...原创 2019-11-17 14:54:05 · 444 阅读 · 0 评论 -
css清除浮动
1.在浮动的父元素下面插入元素 //box为父元素 .box:after{ content: ''; height:0px; display: block; overflow: hidden; clear: both; visibility: hidden; } 2.父元素设置display:inline-block 3.父元素设置over-flow:hidden ...原创 2019-11-12 00:20:26 · 130 阅读 · 0 评论 -
css三角形
div { width: 0; height: 0; border-top: 40px solid transparent; border-left: 40px solid transparent; border-right: 40px solid transparent; border-botto...原创 2019-11-12 00:16:36 · 133 阅读 · 0 评论