純CSS3文字效果推薦_html/css_WEB-ITnose
Jun 24, 2016 pm 12:05 PM
之前曾經(jīng)研究過幾個(gè)純css實(shí)現(xiàn)的文字效果,《CSS文字條紋陰影動(dòng)畫》和《響應(yīng)式奶油立體字效果》等,今天我們來研究幾款文字效果,主要利用text-shadow、webkit內(nèi)核的幾個(gè)獨(dú)有特性實(shí)現(xiàn)效果。
在線研究單擊這里,下載收藏單擊這里。
效果1-立體字效果
我們的html文件貌似這樣,為了更好的展示效果,我們加上了可編輯屬性。
<div contenteditable="true" class="text effect01">前端開發(fā)whqet</div>css文件里,我們先看看全局的設(shè)置
body{ background-color: #666;}@import url(http://fonts.googleapis.com/css?family=Dosis:500,800);.text { font-family:"微軟雅黑", "Dosis", sans-serif; font-size: 80px; text-align: center; font-weight: bold; line-height:200px; text-transform:uppercase; position: relative;}然后才是效果一的專屬CSS,非常簡單,就是用text-shadow實(shí)現(xiàn)立體字效果
.effect01{ background-color: #333; color:#fefefe; text-shadow: 0px 1px 0px #c0c0c0, 0px 2px 0px #b0b0b0, 0px 3px 0px #a0a0a0, 0px 4px 0px #909090, 0px 5px 10px rgba(0, 0, 0, 0.6);}
效果二-長尾效果
html文件還是那樣
<div contenteditable="true" class="text effect02">前端開發(fā)whqet</div>text-shadow里面偏移多一點(diǎn),顏色逐漸簡單,長尾效果就來了。
.effect02{ color:#333; background-color: #ddd; text-shadow: 1px -1px 0 #767676, -1px 2px 1px #737272, -2px 4px 1px #767474, -3px 6px 1px #787777, -4px 8px 1px #7b7a7a, -5px 10px 1px #7f7d7d, -6px 12px 1px #828181, -7px 14px 1px #868585, -8px 16px 1px #8b8a89, -9px 18px 1px #8f8e8d, -10px 20px 1px #949392, -11px 22px 1px #999897, -12px 24px 1px #9e9c9c, -13px 26px 1px #a3a1a1, -14px 28px 1px #a8a6a6, -15px 30px 1px #adabab, -16px 32px 1px #b2b1b0, -17px 34px 1px #b7b6b5, -18px 36px 1px #bcbbba, -19px 38px 1px #c1bfbf, -20px 40px 1px #c6c4c4, -21px 42px 1px #cbc9c8, -22px 44px 1px #cfcdcd;}
效果三-內(nèi)陰影
html文件
<div contenteditable="true" class="text effect03">前端開發(fā)whqet</div>css文件
.effect03{ color: #202020; background-color: #2d2d2d; text-shadow: -1px -1px 1px #111111, 2px 2px 1px #363636;}
效果四-斜紋字描邊效果
<div contenteditable="true" class="text effect04">前端開發(fā)whqet</div>css文件,使用linear-gradient對(duì)div設(shè)置條紋背景、只在文本上顯示背景(-webkit-background-clip: text;)、文字顏色透明(-webkit-text-fill-color: transparent;)和文字描邊(-webkit-text-stroke: 2px #111;)實(shí)現(xiàn)。
.effect04{ background-color: #333; background-image: linear-gradient( 45deg, transparent 45%, hsla(48,20%,90%,1) 45%, hsla(48,20%,90%,1) 55%, transparent 0 ); background-size: .05em .05em; -webkit-background-clip: text; -webkit-text-fill-color: transparent; -webkit-text-stroke: 2px #111;}
效果五-文字條紋動(dòng)畫
html文件
<div data-text="前端開發(fā)whqet" class="text effect05">前端開發(fā)whqet</div>css文件,利用:before偽對(duì)象來顯示條紋,并對(duì)之添加動(dòng)畫。
.effect05{ color:#DC554F; background-color:#27ae60; z-index: 3;}.effect05:before{ content:attr(data-text); width:100%; line-height:200px; opacity: .5; position: absolute; top:2px; left:5px; background-image: linear-gradient( 45deg, transparent 45%, hsla(48,20%,90%,1) 45%, hsla(48,20%,90%,1) 55%, transparent 0 ); z-index:-1; background-size: .05em .05em; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: shadowGo 20s linear infinite; }@keyframes shadowGo{ 0% {background-position: 0 0} 0% {background-position: -100% 100%}};
效果六-描邊文字
html文件
<div contenteditable="true" class="text effect06">前端開發(fā)whqet</div>css文件
.effect06 { -webkit-text-fill-color: transparent; -webkit-text-stroke: 2px #d6d6d6; background: url(http://www.pencilscoop.com/demos/CSS_Text_Effects/images/galaxy.jpg); background-size: cover;}
效果七-遮罩文字
html文件
<div contenteditable="true" class="text effect07">前端開發(fā)whqet</div>css文件
.effect07 { background: url(http://www.pencilscoop.com/demos/CSS_Text_Effects/images/galaxy.jpg) #333; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-size: cover; animation: 10s infinite linear animate;}.effect07:before { content:""; width:100%; height:100%; position: absolute; left:0; top:0; background-color: #999; z-index: -1;}@keyframes animate { 0% { background-position:0; } 100% { background-position:-1000px 0; }}
效果八-3D炫光效果
html文件
<div class="text effect08"> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> <h1>前端開發(fā)whqet</h1> </div>css文件
.effect08 { color:#fff; transform-origin:center bottom; transform-style:preserve-3d; transition:all 1s; cursor: pointer;}.effect08:hover { transform:rotate3d(1, 0, 0, 40deg);}.effect08 h1 { position: absolute; left:0; right:0; margin:auto; text-shadow:0 0 10px rgba(0, 0, 100, .5);}@for $n from 1 to 8 { .effect08 h1:nth-child(#{$n}) { transform:translateZ(4px*$n); }}
That's it.
----------------------------------------------------------
前端開發(fā)whqet,關(guān)注web前端開發(fā),分享相關(guān)資源。
------------------------------------------------------------------

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

????????(Glodon Software)? ????? ??? ???? ????? ???, ?? ??? ?? ??, ??, ?? ??? ?? ??? ???? ??. Glodon ?????? ??? ??? ??? ???? ?? ?? ??? ??? ?????. ? ????? ??? ??? ??? ?? ????? ??? ? ??? Glodon ?????? ??? ?? ?? ??? ?? ???? ??? ?????. Glodon ?????? ???? ??, ????? ? ?? ??? ??? ? ?? ?? ??? ?? ? ??? ?????. ????? ?? ? ????. Intel i7 ??? ?? AMD Ryzen ???? ?? ?? ??, ??? ????? ???? ?? ????. ??? ????? ??? ??? ??? ?? ??? ?? ??? ??? ?? Glodon ?????? ?? ??? ? ? ??? ? ????. ??? ???? ???? ??? ??? ????.

1. ???? ??? ??? ??? ? ????? ?? ??? ?? ?? ? ?????. CS? ?? ??? ???? ? ????? ??? ??? ????? ?? ??? ???? ??? ????. Intel Core i5 ?? i7 ??? ????? ??? ?? ?? ?? ??? ?? ???? ??? CS? ?? ?? ??? ?? ??? ? ???? ???? ?? ????. 2. ??? ?? ??? ??? ?? ??? ???? ??? ?? ? ?????. CS ? ?? ????? ??? ??? ??? ?? ??? ???? ????? ???? ??? ????. NVIDIA GeForce GTX ??? ?? AMD Radeon RX ??? ??? ??? ???? ?? ????. ? ??? ??? ??? ?? ??? ?? ??? ?? ??? ??? ??? ? ?? ?? ??? ??? ? ????.

Taobao? ???? ???? ??? ?? ?? ?? ???? ??? ?? ??? ????. ?? ?? ???? ? ??? ?? ??? ?????. ????? "????" ?? ? ? ??? ??? ??? "? ????"? ???? ?? ?? ???? ??? ? ??? ??? "??" ??? ???? ?? ???? ?????. . 2. ?? ???? ??? ? '???? ??'? ?? ? ??? ???? ?????. 3. ???? ???? '?? ??'? ????. ?? ??? '??'?? ???? ???? ????. 4. ????? ????? "??? ?? ??" ?? ?? ??? ?? ????. ?? ???? ??? ???? ?????.

Java ?????? ???? ???? Java ??????? ??? ? ?? ????????. Java ?? ??? ??????? Java ?????? ??? ? ???? ???? ??? ????? Java ????? ??? ? ????. Java ?????? ????? ??, ?? ? ???? ?? ?????. ? ????? ??? ???? ?? ??? ???? ???? Java ????? ?? ????? ???? ???? ? ??? ?? ?? ?? ???? ???? Java ?????? ?????. ??? ?????? Eclipse????. Ecl

NVIDIA 4060 ??? ?? ???? ?? ?? ????? ??? ?? ???? ??? ??? ? ????? ?? ?????? ???? ???? ?? ??? ???? ?? ????. Intel HD Graphics 4060 ??? ??? ?? ???? ? ??? ?? Intel ?? ????? ??? ?? ????? ???? ?? ????. ???? ??? ??? ????. "Words Play Flowers"? ?? ??? ??? ???? ?? ?? ?? ?????. ? ? ??? ?? ??(Nostalgia Cleaning)???. ??? ???? ??? ???? ?? 12?? ??? ??? ???. ??? ?? ???? ?? ??? ????? ??? ??? ? ??? '????? ?'? ??? ?????? ?? ?? ???? ?? ???? ???????. ???? ??? ???????! ?? ??

?????? ???? ????? ??? ??? ?? 1. ???? 2. ?????? ???? ???? ???? ?? ???? ???? ??? ???? ??? ???? ??? ??? ??? ?? ???? ?????. ?? ??? ?? ???? ? ?? ?? ??? ? ? ?? ??? ??? ? ??? ???? ?? ??? ? ? ??? ? ????. 3. ??? ?? ? ??? ???? ???? ? ?? ??? ????? ??? ???? ??? ???? ???? ?? ????. ?? ? ? ?? ??? ???? ?????? ?? ???? ???? ?? ???? ??? ? ? ??? ? ????. ??, ?????? ???? ???? ???????(GIS) ?????? ???? ??????? ? ?? ??? ?? ???? ??? ?? ??? ? ?? ???? ?????.

Java ????? ??: ??? ???? ??? ?????. ?? ?? ??? ?????. ??: Java ?? ???? ?? ?? Java ???? ?????? ?? ??? ?? ?????. ????? ?? ??? ??? ???? ???? ???? ????? ? ??? ? ? ????. ? ????? ? ?? ??? Java ???? ??? ???? ??? ??? ??? ? ? ??? ??? ? ??? ? ?? ?? ?? ??? ?????. 1. JD-GUIJD-GUI? ?? ?? ?? ?? ?????.

????? ?????: ?? ?? ?? C ???? ?? ?? ??? ??? ????? ?? ? ?? ???? ????? ??? ??? ??? ?????. C ??? ??? ?? ??????? ?? ???? ?? ???? ???????? ?? ???? ????. ????? ???? ??? ???? ???? ???? ?? C?? ????? ???? ?? ?????. ? ????? ???? ???? ??? ? ?? ?? ?? ?? C ?? ????? ?????. GNU ???? ???? GCCGCC? ?? ????? ???? C ?? ???? ? ?????.
