search
HomeWeb Front-endCSS TutorialSettings for text hollowing, transparency and shadow effects in CSS3

This article mainly introduces a summary of examples of text hollowing, transparency value, and shadow effect settings in CSS. Setting the text-stroke-color transparency value can make the text softer to some extent. Friends in need can refer to it. Next

text-fill-color creates hollow text:
Code

-webkit-text-fill-color:transparent;   
-webkit-text-stroke:1px #000;

Effect

201637105111410.png (752×75)

text-stroke-color transparency value makes text softer:
code

background-image:-webkit-linear-gradient(#eee,#000);   
-webkit-background-clip:text;   
-webkit-text-fill-color:transparent;

Effect 1
201637105151945.png (609×90)

code

background-image:-webkit-linear-gradient(#eee,#000);   
-webkit-background-clip:text;   
-webkit-text-fill-color:transparent;   
-webkit-text-stroke:1px transparent;

Effect 2

201637105229256.png (620×72)

Comparison you will find that the text in effect 2 is a little softer than effect 1

text-shadow text shadow
Grammar:

box-reflect:none | [ <length>{2,3} && <color>? ][ , <length>{2,3} && <color>? ]*

Let’s implement a shadowed text example:
Code

text-shadow:2px 2px 0 #000;

Effect
201637105301417.png (622×53)

## text- Shadow has three length parameters, the first one represents horizontal offset, the second one represents vertical offset, and the third one represents blur (optional)

Softer text shadow:
Code

text-shadow:1px 1px 5px #000;

Effect

201637105352727.png (596×46)

Multiple Shades:

Code

text-shadow:1px 1px 5px #000;

Effect


201637105420741.png (578×52)

That’s it The entire content of this article is hoped to be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Use CSS3 to draw basic graphics

The use of CSS3 layer shadows and text shadows

How to use css to make the background image stretch and fill to avoid repeated display

The above is the detailed content of Settings for text hollowing, transparency and shadow effects in CSS3. For more information, please follow other related articles on the PHP Chinese website!

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
Variable Fonts Link Dump!Variable Fonts Link Dump!Apr 16, 2025 am 10:22 AM

There's been a ton of great stuff flying around about variable fonts lately (our tag has loads of stuff as well). I thought I'd round up all the new stuff I

Link Underlines That Animate Into Block BackgroundsLink Underlines That Animate Into Block BackgroundsApr 16, 2025 am 10:14 AM

It's a cool little effect. The default link style has an underline (which is a good idea) and then on :hover you see the underline essentially thicken up

Preloading Pages Just Before They are NeededPreloading Pages Just Before They are NeededApr 16, 2025 am 09:53 AM

The typical journey for a person browsing a website: view a page, click a link, browser loads new page. That's assuming no funny business like a Single Page

Adaptive Photo Layout with FlexboxAdaptive Photo Layout with FlexboxApr 16, 2025 am 09:51 AM

Let’s take a look at a super lightweight way to create a horizontal masonry effect for a set of arbitrarily-sized photos. Throw any set of photos at it, and

The Many Ways to Link Up Shapes and Images with HTML and CSSThe Many Ways to Link Up Shapes and Images with HTML and CSSApr 16, 2025 am 09:45 AM

Different website designs often call for a shape other than a square or rectangle to respond to a click event. Perhaps your site has some kind of tilted or

Web Developer Search HistoryWeb Developer Search HistoryApr 16, 2025 am 09:41 AM

Sophie Koonin blogged "Everything I googled in a week as a professional software engineer," which was a fascinating look into the mind of a web developer and

A Snippet to See all SVGs in a SpriteA Snippet to See all SVGs in a SpriteApr 16, 2025 am 09:31 AM

I think of an SVG sprite as this:

What happens when you open a new install of browsers for the 1st time?What happens when you open a new install of browsers for the 1st time?Apr 16, 2025 am 09:29 AM

Interesting research from Jonathan Sampson, where he watches the network requests a browser makes the very first time you launch it on a fresh install, and

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)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),