【代码笔记】Web-CSS-CSS Display
- 作者: 马桥红柳
- 来源: 51数据库
- 2021-09-03
一,效果图。

二,代码。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>css display(显示)</title>
<style>
h1.hidden {
display: none;
}
li {
display: inline;
}
span {
display: block;
}
</style>
</head>
<body>
<h1>this is a visible heading</h1>
<h1 class="hidden">this is a hidden heading</h1>
<p>notice that the hidden heading still takes up space.</p>
<ul>
<li><a target="_blank">html</a></li>
<li><a target="_blank">css</a></li>
<li><a target="_blank">javascript</a></li>
<li><a target="_blank">xml</a></li>
</ul>
<h2>nirvana</h2>
<span>record: mtv unplugged in new york</span>
<span>year: 1993</span>
<h2>radiohead</h2>
<span>record: ok computer</span>
<span>year: 1997</span>
</body>
</html>
参考资料:《菜鸟教程》
推荐阅读

