随笔分类 -  页面样式

字间距
摘要:letter-spacing 阅读全文
posted @ 2020-07-31 10:05 chenlw101 阅读(100) 评论(0) 推荐(0)
html文本保留空格
摘要:white-space:pre 阅读全文
posted @ 2020-07-27 09:22 chenlw101 阅读(388) 评论(0) 推荐(0)
保留空格换行样式
摘要:<pre> 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体。 <pre>的内容自动换行的问题(兼容多个浏览器): pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-s 阅读全文
posted @ 2020-04-13 09:37 chenlw101 阅读(231) 评论(0) 推荐(0)
字体不对齐解决
摘要:text-align:justify;text-justly:inter-inter-ideograph 阅读全文
posted @ 2019-05-28 14:16 chenlw101 阅读(334) 评论(0) 推荐(0)
响应式布局
摘要:@media screen and (max-width: 500px){ } 阅读全文
posted @ 2019-05-17 10:41 chenlw101 阅读(95) 评论(0) 推荐(0)
文本超出隐藏,可换行
摘要:overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;/*超出2行显示省略号*/ 阅读全文
posted @ 2018-12-29 16:57 chenlw101 阅读(210) 评论(0) 推荐(0)
js控制高度自适应,做到响应式
摘要:window.innerHeight适用在移动端 pc端: 网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeight 网页可见区域宽: document.body.offsetWidth (包括边线的宽) 网页可见区 阅读全文
posted @ 2018-08-01 14:53 chenlw101 阅读(5919) 评论(1) 推荐(0)
文字超出隐藏
摘要:(1).文字超出一行,省略超出部分,显示’…’ 如果这种情况比较多,可以取一个切合作用的类名用于复用。 (2). 可以给定容器宽度限制,超出部分省略 3、html文字超过两行或三行就显示省略号 转载自https://blog.csdn.net/liwenfei123/article/details/ 阅读全文
posted @ 2018-07-18 09:25 chenlw101 阅读(126) 评论(0) 推荐(0)
html里面,没有内容,要高度占满页面
摘要:百分比是根据父元素的,所以要将html也100% 阅读全文
posted @ 2018-07-03 17:00 chenlw101 阅读(529) 评论(0) 推荐(0)
css实现三角形标
摘要:实现右上角三角,父元素需要加上overflow:hidden; 阅读全文
posted @ 2018-07-03 16:58 chenlw101 阅读(329) 评论(0) 推荐(0)