背景平铺:
background: url(/VCG211132352522.webp) no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
超出隐藏:
p {
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
超出两行隐藏:
p {
width: 150px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
权限提升
position: relative !important;
:global(.adm-tab-bar-item-active) {
color: #1ba9ba;
font-weight: bold;
}
这篇文章探讨了CSS在网页设计中的应用,包括如何设置背景图片平铺、实现文本超出隐藏以及限制显示两行,同时提到了使用CSS提升元素的视觉权重,如改变TabBar选中项的样式。这些技巧对优化用户界面和交互体验具有重要意义。
1207

被折叠的 条评论
为什么被折叠?



