時間:2023-09-29 21:48:01 | 來源:網(wǎng)站運營
時間:2023-09-29 21:48:01 來源:網(wǎng)站運營
Web前端設(shè)計秘籍——30個工作中常用的CSS樣式:CSS樣式被稱為“層疊樣式表”,是一種網(wǎng)頁制作不可或缺的技術(shù),是用于修飾網(wǎng)頁樣式,達到設(shè)計效果的一種樣式語言。.title { width: 200px; overflow: hidden; text-overflow: ellipsis; white-space:nowrap;}
.title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; word-break: break-all;}
input::-webkit-input-placeholder { color:skyblue; text-align: center;}input::-ms-input-placeholder { color:skyblue; text-align: center;}input::-moz-placeholder { color:skyblue; text-align: center;}
.box::before { content:""; display: inline-block; height: 100vh; vertical-align: middle; text-align: center;}
.box { background: skyblue; height: 100vh; display: flex; justify-content: center; align-items: center;}
.wrap { margin: 0 auto; width: 800px; text-align: justify; text-justify: distribute-all-lines; /* 兼容IE6-8 */ text-align-last: justify; -moz-text-align-last: justify;}
body,html { -webkit-overflow-scrolling:touch}
07、設(shè)置滾動條樣式.wrap { margin: 0 auto; width: 300px; height: 200px; overflow: auto;}.wrap::-webkit-scrollbar { /* 整體大小樣式 */ width: 10px; height: 10px; }.wrap::-webkit-scrollbar-thumb { /* 滾動條里的滑塊 */ border-radius: 10px; background-color: skyblue; background-image: -webkit-linear-gradient(45deg,rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 55%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);}.test::-webkit-scrollbar-track {/* 滾動條的軌道 */ box-shadow: inset 0 0 5px rgba(0,0,0,0.2); background: #ededed; border-radius: 10px;}
.wrap { margin: 0 auto; width: 300px; height: 200px; overflow: auto; scrollbar-width: none; -ms-overflow-style: none;}.wrap::-webkit-scrollbar {/* 整體大小樣式 */ display: none;}
div { width:0; height:0; border-width: 0 40px 40px; border-style: solid; border-color: transparent transparent rgba(0,0,0,0.3);}
CSS樣式效果圖div { position: relative; width:0; height:0; border-width: 40px 0 40px 40px ; border-style: solid; border-color: transparent black ;}div::after { content: ""; position: absolute; top:-36px; left:-38px; border-width: 36px 0 36px 36px ; border-style: solid; border-color: transparent red ;}
.wrap { margin: 0 auto; width: 600px; text-indent: 2em; letter-spacing: 10px;}
.wrap { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}
12、元素占滿整個屏幕.mask { width:100%; height: 100vh; background: rgba(0,0,0,0.6); position: fixed; top: 0;}
關(guān)鍵詞:中常,樣式,工作,設(shè)計,秘籍
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。