html页面美化特效代码
时间: 2023-09-09 10:08:40 浏览: 428
当然,我可以提供一些常见的HTML页面美化特效代码。以下是几个示例:
1. 背景渐变效果:
```html
<style>
body {
background: linear-gradient(to bottom, #ffcc00, #ff9900);
}
</style>
```
2. 文字阴影效果:
```html
<style>
h1 {
text-shadow: 2px 2px 4px #000000;
}
</style>
```
3. 图片边框效果:
```html
<style>
img {
border: 5px solid #ff0000;
border-radius: 10px;
}
</style>
```
4. 按钮动画效果:
```html
<style>
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
}
.button:hover {
background-color: #555555;
color: white;
}
</style>
<button class="button">点击我</button>
```
这些代码只是一些简单的示例,你可以根据自己的需求进行修改和扩展。希望对你有所帮助!如果你有其他问题,请继续提问。