<!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>文字阴影与盒子阴影的对比</title>
<style>
h1{
font-size:60px;
color: rgb(169, 235, 247);
font-weight:700;
font-family:'隶书';
text-shadow:10px 10px 12px rgb(161, 164, 165);
}
div{
width:200px;
height:200px;
background-color: rgb(42, 151, 165);
padding:5px;
box-shadow: 10px 10px 5px #888888;
text-align: center;
}
</style>
</head>
<body>
<h1>忠于自己热爱生活</h1>
<div>前程似锦,未来可期。</div>
</body>
</html>
此博客展示了HTML中的文字阴影和盒子阴影效果,通过一个标题和一个div元素的实例,详细对比了两者在视觉呈现上的差异。文章使用了隶书字体和亮丽的色彩来突出文字阴影,并创建了一个带有背景色和内边距的div元素,应用了盒子阴影,以此探讨它们在网页设计中的应用。
1555

被折叠的 条评论
为什么被折叠?



