0
点赞
收藏
分享

微信扫一扫

2.[css基础知识]标签展示方式

1知识点

2.[css基础知识]标签展示方式_块状元素

 

知识点:

  块状元素和行内块元素之间转化

 

 

 2.效果图

2.[css基础知识]标签展示方式_代码实现_02

3.代码实现

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
a {
width:100px;
height: 30px;
background-color: pink;
display: inline-block;
text-decoration: none;
text-align: center;
color:#fff;
font-weight: bold;
line-height: 30px;
}
a:hover {
background-color: orange;
color:yellow;
}
</style>
</head>
<body>
<a href="#">新闻</a>
<a href="">体育</a>
<a href="">汽车</a>
<a href="#">好用</a>
</body>
</html>

 

举报

相关推荐

HTML+CSS基础知识(2)

CSS 基础知识

CSS基础知识

CSS 基础知识-01

CSS基础知识(一)

css基础知识1

CSS基础知识复习

0 条评论