半点优化网 http://www.bdxc.net/
当前位置首页 > 网站建设> 正文

网页设计与制2作中变色的文字怎么弄

2022-08-08 01:49:02 暂无评论 76 网站建设 缩进   网页设计   文字

<style type=text/css>
a:link {color:blue;}
a:visited {color:blue;}
a:hover {color:red;}
a:active {color:yellow;}
</style>
<html>
<body>
<div><a href=#>文字测试</a></div>
</body>
</html>

网页设计时如何将图片和文字位于同一水平

第一种:不要给文字标签加属性。给img{vertical-align: middle;}一个属性即可。
第二种:img标签向左浮动,给文字加一个标签(例如span),然后设置文字标签为块状,并设置上(内/外)边距。span{ display:inline-block; margin-top:4px; margin-top:4px;} 内边距,外边据均可,最好是内边距。
第三种:给文字加个标签(例如span),同时控制这两个标签浮动。并给文字加行高,其值为图片高度值。如:img{float:left;} span{ float:left; line-height:40px;} (若图片的高度为40px)

网页设计如何让div的文字首行缩进

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!doctype html>
<html>
<head>
<metacharset=UTF-8>
<title>Document</title>
<styletype=text/css>
    .big { text-indent:100px;}
</style>
</head>
<body>
<divclass=big>
aaaaaaaaaaaaaaaaaa
</div>
</body>
</html>

这个意思??