text-shadow box-shadow
/*
text-shadow
box-shadow
*/
INDEX.HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Tutorial</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>main heading</h1>
<div class="box">
</div>
</body>
</html>
CSS:
/*
text-shadow
box-shadow
*/
h1 {
text-shadow: 3px 3px 3px red;
/* https: //css3gen.com/text-shadow/ */
text-shadow: 3px 4px 2px rgba(255, 11, 179, 1);
}
.box {
width: 300px;
height: 150px;
background: yellow;
/* https: //cssgenerator.org/box-shadow-css-generator.html */
transition: all 0.5s linear;
}
.box:hover {
box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
-webkit-box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
}
评论
发表评论