请参照网址"https://www.bjd.com.cn/jbw/news/"写一个相似的的html网页并给出代码,要求包含丰富的样式、布局和动态效果,代码中的中文都可以用简单的一个词来代替,只需要给出完整的页面框架代码和css代码即可
时间: 2023-05-25 17:06:12 浏览: 147
XEP-0035: SSL/TLS Integration.pdf
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>新闻资讯</title>
<style>
body{
background-color: #eee;
font-family: Arial, Helvetica, sans-serif;
}
.wrapper{
width: 80%;
margin: 0 auto;
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px #aaa;
}
h1{
text-align: center;
color: #f00;
margin-bottom: 30px;
}
.news{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.news-item{
width: 30%;
margin-bottom: 30px;
box-shadow: 0 0 5px #aaa;
border-radius: 5px;
overflow: hidden;
position: relative;
transition: transform 0.3s ease-in-out;
}
.news-item:hover{
transform: translateY(-5px);
box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}
.news-item img{
width: 100%;
height: 180px;
object-fit: cover;
}
.news-item .title{
padding: 10px;
background-color: rgba(0,0,0,0.8);
color: #fff;
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
</style>
</head>
<body>
<div class="wrapper">
<h1>国内新闻</h1>
<div class="news">
<div class="news-item">
<img src="https://picsum.photos/600/400?random=1" alt="新闻图片">
<div class="title">新闻标题1</div>
</div>
<div class="news-item">
<img src="https://picsum.photos/600/400?random=2" alt="新闻图片">
<div class="title">新闻标题2</div>
</div>
<div class="news-item">
<img src="https://picsum.photos/600/400?random=3" alt="新闻图片">
<div class="title">新闻标题3</div>
</div>
<div class="news-item">
<img src="https://picsum.photos/600/400?random=4" alt="新闻图片">
<div class="title">新闻标题4</div>
</div>
<div class="news-item">
<img src="https://picsum.photos/600/400?random=5" alt="新闻图片">
<div class="title">新闻标题5</div>
</div>
<div class="news-item">
<img src="https://picsum.photos/600/400?random=6" alt="新闻图片">
<div class="title">新闻标题6</div>
</div>
</div>
</div>
</body>
</html>
阅读全文