Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Text shadow (bump) css implementation


May 30, 2021 Article blog


Table of contents


Text shadow (bump) effect:

 Text shadow (bump) css implementation1

The content of the code

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>w3cschool</title>

<style type="text/css">

body{

background-color#ccc;

}

div{

font700 80px "微软雅黑";

color#ccc;

}

div:first-child{

/* text-shadow: 水平位置 垂直位置 模糊距离 阴影颜色 */

text-shadow1px 1px 1px #000,-1px -1px 1px #fff;

}

div:last-child{

/* text-shadow: 水平位置 垂直位置 模糊距离 阴影颜色 */

text-shadow: -1px -1px 1px #000,1px 1px 1px #fff;

}

</style>

</head>

<body>

<div>我是凸起的文字</div>

<div>我是凹下的文字</div>

</body>

</html>

Recommended good lessons: CSS micro-classes, HTML-CSS advanced combat