利用css的样式对文本进行隐藏和显示等操作
2016-06-23来源:易贤网

代码如下:

<!doctype html public -//w3c//dtd html 4.01 transitional//en http://www.w3.org/tr/html4/loose.dtd>

<html>

<head>

<meta http-equiv=content-type content=text/html; charset=utf-8>

<title>insert title here</title>

<!--文本的显示和隐藏 -->

<style type=text/css>

#div_2{

display: inline;

}

#span_1{

/* display:block; */

visibility: hidden;

}

</style>

</head>

<body>

<div>div1</div>

<div id=div_2>div2</div>

<span id=span_1>span1</span>

<span>span2</span>

</body>

</html>

推荐信息