㈠ 如何将真个div加上连接效果啊
链接a和div是两种不同的元素,div没有链接效果,a才是真正的链接。
可以把a标签设置为块元素,高度和宽度均为100%显示,这样就会把链接覆盖整个容器。
㈡ 如何使div里的两个div两端对齐
设置所在层的padding和margin属性就好了如下
div { padding:10px; }
div img { margin-right:10px; margin-bottom:10px; }
还可以设置一下行距:line-height:30px;
字体间距根据需要调节:letter-space:1px;(负数是间距越来越小,正数是间距越来越大)
记得将div修改成所在层的id或者class。
㈢ 怎么整个DIV加超链接
1、打开html编辑器,新建一个html文件,写入一个div容器,容器里面有一个a标签:
㈣ 怎么让一个div底部紧贴另一个div头部
#CSS
.1 {position:relative;}
.2 {position:absolute;left;0;bottom:0;}
#HTML
<div class="1">
<div class="2"></div>
</div>
不影响其他元素的情况下定位最好;
如果 DIV1 里 只有 DIV2 的话:
在DIV2 CSS样式里 加一个 margin-top:10px;
10px 改成要数值,或者在 DIV1 里加个 内边距 padding-top:10px;
㈤ 关于DIV + CSS无缝拼接和两个DIV并排,请高人指点!
里面的长宽和内容自己修改。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
*{
:0;
padding:0;
}
.d1 {
margin: auto;
height: 200px;
width: 504px;
}
.d2 {
margin: auto;
height: 200px;
width: 504px;
}
.d3 {
margin: auto;
height: 200px;
width: 504px;
}
.d1-1 {
height: 100px;
width: 504px;
float: left;
background-color: #000;
}
.d1-2 {
height: 100px;
width: 252px;
float: left;
background-color: #030;
}
.d1-3 {
height: 100px;
width: 252px;
float: left;
background-color: #CF0;
}
.d2-1 {
height: 200px;
width: 252px;
float: left;
background-color: #03F;
}
.d2-2 {
height: 200px;
width: 252px;
float: left;
background-color: #F00;
}
.d3-1 {
height: 200px;
width: 168px;
float: left;
background-color: #900;
}
.d3-2 {
height: 200px;
width: 168px;
float: left;
background-color: #FFC;
}
.d3-3 {
height: 200px;
width: 168px;
float: left;
background-color: #36C;
}
</style>
</head>
<body>
<div class="d1">
<div class="d1-1"></div>
<div class="d1-2"></div>
<div class="d1-3"></div>
</div>
<div class="d2">
<div class="d2-1"></div>
<div class="d2-2"></div>
</div>
<div class="d3">
<div class="d3-1"></div>
<div class="d3-2"></div>
<div class="d3-3"></div>
</div>
</body>
</html>
㈥ 怎么在css 让上下两个div紧贴一起,不留空格
这个功能用css完全可以做得到,通过设置两个div的margin就可以,如果离的远,就用margin为负值,总之实现起来是可以的。
㈦ 如何用div+css无缝拼接图片
你看这样子是不是你想要的效果
<divstyle="width:750px;">
<ulstyle="margin:0;padding:0;">
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
<listyle="margin:0;padding:0;list-style-type:none;float:left;width:250px;"><ahref="#"><imgsrc="001.jpg"style="display:block;"/></a></li>
</ul></div>
宽度(width)根据你自己的实际情况去改变就可以了
㈧ 怎么让一个div紧跟在另一个div之后
所谓的浮动,必须前面中间后面的都浮动float:left 。
㈨ 如何让html让两个DIV相交在一起
用position 相对位置 做图层效果。
例:
position: absolute; 设为相对位置
z-index: 999; 设置层级
top: 10px; 设置位置或使用right left top: -10px;
㈩ 如何实现两个div之间的连线,我现在有这个需求,请问如何实现
在css2中线条只能水平或者垂直,你这样是不能实现的
亮点建议:
1、采用图片
2、有关系的可以用同一色块表明,不一定要连线。