<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS---浮动练习---新闻标题</title>
<style type="text/css">
.news_title{
width: 400px;
height: 40px;
border-bottom:1px solid gold;
margin: 50px auto 0;
}
.news_title h3{
float: left;
width: 80px;
height: 40px;
background-color: aqua;
margin: 0;
font-size:16px ;
color: #fff;
text-align: center;
line-height: 40px;
font-weight: normal;
}
.news_title a{
float: right;
/* background-color: darkblue; */
/* height: 40px; */
text-align: center;
font:normal 14px/40px "microsoft yahei";/* 加粗 大小 行高 字体 */
text-decoration: none;
color: darkorchid;
}
.news_title a:hover{
color: crimson;
font-size: 20px;
}
</style>
</head>
<body>
<div id="" class="news_title">
<h3>新闻列表</h3> <!-- h标签默认有margin-->
<a href="#">更多 ></a>
</div>
</body>
</html>
CSS---浮动练习---新闻标题
猜你喜欢
转载自blog.csdn.net/qq_43766304/article/details/104758825
今日推荐
周排行