Blogger Information
Blog 38
fans 0
comment 0
visits 25320
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
第二课—2018年8月13日 20时00分
空白
Original
517 people have browsed it

实例

<!DOCTYPE html>
<html>
<head>
	<title>第二课 文本控制</title>
	<style type="text/css">
		.desc {
			display: block;
			height: 40px;
			width: 400px;
			overflow: hidden;
			background-color: #ccc;
		}
		.desc:hover {
			overflow: visible;
		}
	</style>
</head>
<body>
	<span>图文混编</span>
	<img src="img/12.jpg" width="512px;" height="359px;">
	<span class="desc">快乐,使生命得以延续。快乐,是精神和肉体的朝气,是希望和信念,是对自己的现在和未来的信心,是一切都该如此进行的信心。</span>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

123.png

手抄代码:

IMG_20180814_221337.jpg

总结:

    1.块级元素独占一行,对宽度的属性值设置是生效的,自带换行符,默认宽度为100%,如p

    2.行内元素:可以共存于一行,对宽高属性值设置不生效,如span

    3.行内块级元素:结合了块级元素以及行内元素的特点,既能设置宽高又能存在于一行,如 img

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post