CSS實(shí)現(xiàn)的div懸浮框并且兼容IE6的樣式
發(fā)布時(shí)間:2013-12-09 17:27:28 作者:佚名
我要評(píng)論
div懸浮框在某些特殊場(chǎng)合還是比較實(shí)用的,下面為大家介紹下使用CSS實(shí)現(xiàn)的并且兼容IE6,示例如下,感興趣的朋友可以練練手
復(fù)制代碼
代碼如下:<!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=gb2312" />
<title>CSS固定定位</title>
<style type="text/css">
{
padding:0;
margin:0;
}
#fixedLayer{
width:100px;
line-height:50px;
background: #FC6;
border:1px solid #F90;
position:fixed;
right:10px;
bottom:10px;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {
height:100%;
overflow:hidden;
}
body {
height:100%;
overflow:auto;
}
#fixedLayer {
position:absolute;
}
</style>
<![endif]-->
</head>
<body>
<div id="fixedLayer">固定不動(dòng)</div>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
<p>dd</p>
</body>
</html>
相關(guān)文章
CSS鼠標(biāo)懸浮DIV后顯示DIV外的按鈕解決方法
昨天寫(xiě)樣式遇到個(gè)問(wèn)題,如何讓鼠標(biāo)懸浮DIV后,顯示DIV外的按鈕,可以點(diǎn)擊到按鈕。下面通過(guò)本文給大家分享CSS鼠標(biāo)懸浮DIV后顯示DIV外的按鈕解決方法,感興趣的朋友一起看看2017-08-26純CSS結(jié)合DIV實(shí)現(xiàn)的右側(cè)底部簡(jiǎn)潔懸浮效果
右側(cè)浮動(dòng)效果,最早有QQ聯(lián)系面板,對(duì)聯(lián)廣告等,大多數(shù)都是基于Javascript實(shí)現(xiàn)的動(dòng)態(tài)效果,今天我給大家分享一個(gè)只需要CSS結(jié)合DIV實(shí)現(xiàn)的右側(cè)浮動(dòng)效果2014-09-10采用CSS定位屬性實(shí)現(xiàn)Html中DIV層疊與懸浮
DIV沒(méi)有懸浮一說(shuō),更準(zhǔn)確的應(yīng)為層疊或者固定,下面為大家介紹的是通過(guò)CSS定位屬性來(lái)實(shí)現(xiàn)這一效果2014-05-18
純CSS實(shí)現(xiàn)DIV懸浮的示例代碼(固定位置)
這篇文章主要介紹了純CSS實(shí)現(xiàn)DIV懸浮的示例代碼(固定位置),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一2021-01-07

