css一些常用技巧代码
2024-09-04 13:18:02
- 图片等比例自动缩放
img{
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
- 多行省略 最后line-clamp设置的是几行
ellipsis()
overflow : hidden
text-overflow : ellipsis
display : -webkit-box
-webkit-box-orient : vertical
-webkit-line-clamp 3
- css实现宽高比例一致的图形 (可防止图片抖动)
width: 100%
height: 0
overflow: hidden
padding-bottom: 26.7%
- vue中样式穿透 样式穿透用>>> 在组件中scoped只能用自己的样式 不能用子组件的样式 使用>>>可以从父组件中穿透 改变其子组件的样式
.wrapper >>> .swiper-pagination-bullet-active
最新文章
- c# 传递Null的string值导致的调用C++的dll报错 Attempted to read or write protected memory.
- oracle 密码过期处理
- mvc model 传值两种方式区别
- [ZZ]Sign Up for the First-Ever Appium Roadshow on August 20th in New York City
- VS-FluentData 单元测试
- c++爱问的面试问题
- Bootstrap入门(十五)组件9:面板组件
- 2.4JAVA基础复习——JAVA语言的基础组成数组
- 有关vue开发的小经验
- [Vue]createElement参数
- 【Spring】24、<;load-on-startup>;0<;/load-on-startup>;配置
- exec dbms_stats.gather_schema_stats 手动优化统计
- asyncio queue
- 动态产生select option列表
- [JSOI 2007]字符加密Cipher
- effective c++ 笔记 (49-52)
- mysql 5.7设置密码无效
- Socket 编程(二)
- macOS Sierra上Opencv的安装与使用
- 如何控制DBGrid里面显示的浮点数小数点后的位数?
热门文章
- 06 Counting Point Mutations
- 编写高质量代码改善C#程序的157个建议——建议80:用Task代替ThreadPool
- mysql数据库使用sql查询数据库大小及表大小
- [LeetCode 题解]: Pascal&#39;s Triangle
- [LeetCode 题解]: pow(x,n)
- Javascript 链式作用域 function fn(){}和var fn=function(){}区别
- Centos 固定ip
- navicat 导入txt到数据库
- 874. Walking Robot Simulation
- “全栈2019”Java第十四章:二进制、八进制、十六进制