㈠ 如何將真個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、有關系的可以用同一色塊表明,不一定要連線。