search
HomeWeb Front-endHTML TutorialPure CSS3 text effect recommendation_html/css_WEB-ITnose

I have studied several text effects implemented in pure CSS before, such as "CSS Text Stripe Shadow Animation" and "Responsive Cream Three-dimensional Character Effect". Today we will study several text effects, mainly using text- Several unique features of shadow and webkit kernels achieve effects.

Click here to study online and click here to download collections.

Effect 1-3D text effect


Our html file looks like this. In order to better display the effect, we have added editable attributes.

<div contenteditable="true" class="text effect01">前端开发whqet</div>
In the css file, we first look at the global settings

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;}
Then there is the exclusive CSS for effect one, which is very simple. Just use text-shadow to achieve the three-dimensional character effect

.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);}

Effect 2-long tail effect


html file Still the same

<div contenteditable="true" class="text effect02">前端开发whqet</div>
The text-shadow is offset a little more, the color becomes simpler, and the long tail effect comes.

.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;}

Effect 3-Inner Shadow


html file

<div contenteditable="true" class="text effect03">前端开发whqet</div>
css file

.effect03{  color: #202020;  background-color: #2d2d2d;  text-shadow:     -1px -1px 1px #111111,    2px 2px 1px #363636;}

Effect 4-twill stroke effect


html file

<div contenteditable="true" class="text effect04">前端开发whqet</div>
css file, use linear-gradient to set striped background for div, only in Implementation of displaying background on text (-webkit-background-clip: text;), transparent text color (-webkit-text-fill-color: transparent;) and text stroke (-webkit-text-stroke: 2px #111;) .

.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;}

Effect Five - Text Stripe Animation


html file

<div data-text="前端开发whqet" class="text effect05">前端开发whqet</div>
css file, using :before pseudo-object Displays and animates stripes.

.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%}}; 

Effect Six - Stroke Text


html file

<div contenteditable="true" class="text effect06">前端开发whqet</div>
css file

.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;}

Effect 7 - Mask text


html file

<div contenteditable="true" class="text effect07">前端开发whqet</div>
css file

.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;    }}

Effect eight-3D glare effect


html file

<div class="text effect08">  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>  <h1 id="前端开发whqet">前端开发whqet</h1>
</div>
css file

.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.

--------------------------------------------- --------------------------

Front-end development whqet, pay attention to web front-end development and share related resources.
-------------------------------------------------- ------------------

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
推荐2022年英伟达40系列显卡驱动版本推荐2022年英伟达40系列显卡驱动版本Jan 02, 2024 pm 06:43 PM

英伟达4060显卡驱动版本推荐笔记本电脑上的显卡驱动版本选择一般建议选择官网推荐的版本或者最新的版本。对于IntelHDGraphics4060这款显卡,建议选择Intel官网上发布的最新驱动程序进行更新安装。具体步骤如下:《文字玩出花》是一款备受欢迎的文字解谜游戏,每天都会推出新的关卡。其中有一关名为怀旧大扫除,我们需要在图中找出12个与当时年代不符的元素。今天,我将为大家带来《文字玩出花》怀旧大扫除关卡的通关攻略,帮助还未通过的玩家们顺利过关。让我们一起来看看具体的操作步骤吧!访问Intel

CS玩家的首选:推荐的电脑配置CS玩家的首选:推荐的电脑配置Jan 02, 2024 pm 04:26 PM

1.处理器在选择电脑配置时,处理器是至关重要的组件之一。对于玩CS这样的游戏来说,处理器的性能直接影响游戏的流畅度和反应速度。推荐选择IntelCorei5或i7系列的处理器,因为它们具有强大的多核处理能力和高频率,可以轻松应对CS的高要求。2.显卡显卡是游戏性能的重要因素之一。对于射击游戏如CS而言,显卡的性能直接影响游戏画面的清晰度和流畅度。建议选择NVIDIAGeForceGTX系列或AMDRadeonRX系列的显卡,它们具备出色的图形处理能力和高帧率输出,能够提供更好的游戏体验3.内存电

游戏中打击噪音减少的键盘推荐游戏中打击噪音减少的键盘推荐Jan 05, 2024 am 10:36 AM

去推荐静音游戏键盘如果你想在游戏中享受安静的体验,可以考虑购买一款静音游戏键盘。推荐的产品有CherryMXSilent、LogitechG915和SteelSeriesApexPro等。这些键盘都具有低噪音的特点,操作轻便且响应迅速。此外,建议选择具有可调节背光亮度、可编程功能和舒适手感等特点的键盘,以满足更好的使用需求。公认最静音的键盘《杜伽K320》是一款备受喜爱的电子产品。它以其出色的性能和功能而闻名,是许多人心目中的理想之选。无论是游戏、娱乐还是办公,杜伽K320都能提供出色的表现。它

广联达软件电脑配置推荐;广联达软件对电脑的配置要求广联达软件电脑配置推荐;广联达软件对电脑的配置要求Jan 01, 2024 pm 12:52 PM

广联达软件是一家专注于建筑信息化领域的软件公司,其产品被广泛应用于建筑设计、施工、运营等各个环节。由于广联达软件功能复杂、数据量大,对电脑的配置要求较高。本文将从多个方面详细阐述广联达软件的电脑配置推荐,以帮助读者选择适合的电脑配置处理器广联达软件在进行建筑设计、模拟等操作时,需要进行大量的数据计算和处理,因此对处理器的要求较高。推荐选择多核心、高主频的处理器,如英特尔i7系列或AMDRyzen系列。这些处理器具有较强的计算能力和多线程处理能力,能够更好地满足广联达软件的需求。内存内存是影响计算

Golang编辑器推荐:五个适合开发的选择Golang编辑器推荐:五个适合开发的选择Jan 19, 2024 am 09:00 AM

随着Golang的流行和普及,越来越多的开发者开始使用这门编程语言。然而,和其他流行的编程语言一样,Golang的开发需要选择一款适合的编辑器来提高开发效率。在本文中,我们将介绍五个适合Golang开发的编辑器。VisualStudioCodeVisualStudioCode(简称VSCode)是微软开发的一款免费的跨平台编辑器。它是基于Elect

地理信息科学专业学生应选择哪种电脑地理信息科学专业学生应选择哪种电脑Jan 13, 2024 am 08:00 AM

推荐适合地理信息科学专业学生用的电脑1.推荐2.地理信息科学专业学生需要处理大量的地理数据和进行复杂的地理信息分析,因此需要一台性能较强的电脑。一台配置高的电脑可以提供更快的处理速度和更大的存储空间,能够更好地满足专业需求。3.推荐选择一台配备高性能处理器和大容量内存的电脑,这样可以提高数据处理和分析的效率。此外,选择一台具备较大存储空间和高分辨率显示屏的电脑也能更好地展示地理数据和结果。另外,考虑到地理信息科学专业学生可能需要进行地理信息系统(GIS)软件的开发和编程,选择一台支持较好的图形处

PHP爬虫类库推荐:如何选择最适合的工具?PHP爬虫类库推荐:如何选择最适合的工具?Aug 07, 2023 am 10:42 AM

PHP爬虫类库推荐:如何选择最适合的工具?在互联网时代,信息爆炸性增长使得获取数据变得非常重要。而爬虫就是一种非常重要的工具,它可以自动化地从互联网上获取数据并进行处理。在PHP开发中,选择一个适合的爬虫类库是非常关键的。本文将介绍几个常用的PHP爬虫类库,并提供相应的代码示例,帮助读者选择最适合的工具。GoutteGoutte是一个使用PHP进行网页抓取的

2023年推荐的价格在7000元左右的游戏本2023年推荐的价格在7000元左右的游戏本Jan 09, 2024 am 11:41 AM

很多小伙伴手里的预算都是比较充足的,想要购入一台比较不错的游戏本,但是不知道应该如何进行选择,下面我们就从多个方面来分析一下那些笔记本适合我们使用。7000元左右的游戏本推荐2023:购买指引:1、既然是游戏本,那么性能方面一定要优秀。2、再者就是散热,散热对于一台游戏本来说也是很重要的。3、还有就是刷新频率,特别是喜欢游玩枪战游戏的小伙伴来说刷新率尤为重要。4、了解清楚以上几点我们就可以开始选购了。电脑品牌电脑价格联想拯救者R9000X7499元华硕天选3锐龙版8199元小米RedmiGPro

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)