一個(gè)仿糯米彈框效果demo

代碼如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tabs</title>
<style type="text/css">
/* Remove margin padding */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td { margin:0; padding:0; }
/* Default Font */
body,button,input,select,textarea { font:12px/1.5 \5b8b\4f53,arial,sans-serif; }
h1,h2,h3,h4,h5,h6 { font-size:100%; }
address,cite,dfn,em,var { font-style:normal; }
code,kbd,pre,samp { font-family:courier new,courier,monospace; }
small { font-size:12px; }
ul,ol { list-style:none; }
a { text-decoration:none; }
a:hover { text-decoration:underline; }
sup { vertical-align:text-top; }
sub { vertical-align:text-bottom; }
legend { color:#000; }
fieldset,img { border:0; }
button,input,select,textarea{ font-size:100%; }
table { border-collapse:collapse; border-spacing:0; }
.col-main{ float:left; width:100%; min-height:1px; }
.col-sub,.col-extra { float:left; }
.layout:after,.main-wrap:after,.col-sub:after,.col-extra:after { content:'\20'; display:block; height:0; clear:both; }
.layout,.main-wrap,.col-sub,.col-extra { zoom:1; }
/* Common Features */
.hidden { display:none; }
.invisible { visibility:hidden; }
/* Remove Float */
.clear { display:block; height:0; overflow:hidden; clear:both; }
.clearfix:after { content:'\20'; display:block; height:0; clear:both; }
.clearfix { *zoom:1; }
/* For non ie browsers also display the vertical scroll bar by default, to prevent the flicker caused by the scroll bar */
html { overflow-y:scroll; }
/* Default link styles */
a:link {color: #003399; }
a:visited {color: #123689;}
a:hover {color: #FF6600;}
</style>
</head>
<body>
<style type="text/css">
body { height:1000px; }
.dialog-wrap, .dialog { display:none; }
.dialog-wrap { position:absolute; top:0px; left:0px; width:100%; z-index:99; background:#000; }
.dialog {
border:10px;
background:url(images/welcome91981.png) no-repeat;
z-index:199;
position:fixed;
_position:absolute;
width:451px;
height:313px;
top:50%;
left:50%;
margin:-156px 0px 0px -225px;
border-radius:10px;text-align:left;
}
.dialog .city-box { position:relative; width:100%; height:100% }
.dialog .close { position:absolute; width:18px; height:18px; top:16px; right:16px; z-index:205; }
.dialog .close a { display:block; width:100%; height:100%; }
.cityBox{position:absolute;cursor:pointer;top:143px;left:212px;height:30px;line-height:30px;font-size:16px;color:#f4396d;padding:0 30px 0 10px;display:inline-block; z-index:200; }
.cityBox span{width:90px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:inline-block}
.hotCityBox{position:absolute;width:272px;top:160px;left:170px;display:none;z-index:200;}
.togle{color:#fff;position:absolute;left:50%;font-size:28px;z-index:200;}
.togleborder{position:absolute;left:50%;font-size:28px;color:#ddd;top:3px;z-index:200;}
.hotCityList{background:#fff;border-radius:5px;box-shadow:1px 1px 1px #333;top:22px;position:absolute;width:270px;border:1px solid #ddd; z-index:202;}
.hotCityList p{padding:5px 0}
.hotCityList p a{padding:0 8px;height:22px;line-height:22px;color:#333;font-size:14px;margin:3px 5px;text-align:center;display:inline-block;float:left}
.hotCityList p a:hover{background:#f55583;color:#fff;text-decoration:none}
.moreCity{border-top:1px solid #c6c6c6;height:30px;line-height:30px;text-align:right;}
.moreCity a{color:#f55583;font-size:14px;margin-right:10px}
.cityConfirm{position:absolute;cursor:pointer;width:168px;height:48px;left:137px;bottom:22px;}
.cityConfirm a{width:168px;height:48px;display:block}
.evet { display:none; position:absolute; top:0px; left:0px; width:100%; height:100%; z-index:198; }
</style>
<div class="dialog-wrap"></div>
<div class="dialog">
<div class="city-box">
<div class="close"><a title="關(guān)閉" href="javascript:close_dialog();" rel="external nofollow" ></a></div>
<div class="cityBox"><span>北京</span></div>
<div class="hotCityBox">
<div class="togleborder">◊</div>
<div class="togle">♦</div>
<div class="hotCityList">
<p class="clearfix">
<a href="">北京</a>
<a href="">上海</a>
<a href="">天津</a>
<a href="">杭州</a>
<a href="">西安</a>
<a href="">成都</a>
<a href="">鄭州</a>
<a href="">廈門(mén)</a>
<a href="">青島</a>
<a href="">深圳</a>
<a href="">太原</a>
<a href="">重慶</a>
<a href="">武漢</a>
<a href="">南京</a>
<a href="">廣州</a>
<a href="">沈陽(yáng)</a>
<a href="">濟(jì)南</a>
<a href="">哈爾濱</a>
</p>
<div class="moreCity"><a href="">更多城市>></a></div>
</div>
</div>
<div class="cityConfirm"><a title="開(kāi)始團(tuán)購(gòu)" href=""></a></div>
<div class="evet"></div>
</div>
</div>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function dialog(){
var h = $('body').height();
$('.dialog-wrap').css({'height':h,'opacity':0.5,'display':'block'});
$('.dialog').show();
}
function close_dialog(){
$('.dialog, .dialog-wrap').hide();
}
$('.cityBox').click(function(){
$('.hotCityBox, .evet').show();
});
$('.evet, .dialog-wrap').click(function(){
$('.hotCityBox, .evet').hide();
$('.evet').hide();
});
//dialog();
</script>
<p onClick="dialog()" style="cursor:pointer">點(diǎn)擊這里看效果</p>
<br>
我是文字我是文字文字我字我是文字我是文字
</body>
</html>
相關(guān)文章
jquery仿蘋(píng)果的時(shí)間/日期選擇效果
本篇文章主要介紹了jquery仿蘋(píng)果的時(shí)間/日期選擇效果的實(shí)例,具有很好的參考價(jià)值。下面跟著小編一起來(lái)看下吧2017-03-03
完美解決jQuery的hover事件在IE中不停閃動(dòng)的問(wèn)題
下面小編就為大家?guī)?lái)一篇完美解決jQuery的hover事件在IE中不停閃動(dòng)的問(wèn)題。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-02-02
使用Easyui實(shí)現(xiàn)查詢(xún)條件的后端傳遞并自動(dòng)刷新表格的兩種方法
這篇文章主要介紹了使用Easyui實(shí)現(xiàn)查詢(xún)條件的后端傳遞并自動(dòng)刷新表格的兩種方法,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-09-09
jquery ui bootstrap 實(shí)現(xiàn)自定義風(fēng)格
本文主要是給大家分享了jQuery UI bootstrap的自定義風(fēng)格,以及自定義的方法,非常的實(shí)用,有需要的小伙伴千萬(wàn)不要錯(cuò)過(guò)2014-11-11
(模仿京東用戶(hù)注冊(cè))用JQuery實(shí)現(xiàn)簡(jiǎn)單表單驗(yàn)證,初學(xué)者必看
下面小編就為初學(xué)者們分享一篇(模仿京東用戶(hù)注冊(cè))用JQuery實(shí)現(xiàn)簡(jiǎn)單表單驗(yàn)證,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-01-01
jQuery 類(lèi)twitter的文本字?jǐn)?shù)限制帶提示效果插件
基于jquery的仿twitter的文本字?jǐn)?shù)限制帶提示效果插件,這里提示比較好,不是簡(jiǎn)單的限制,給用戶(hù)更好的體驗(yàn)。2010-04-04
基于cookie實(shí)現(xiàn)zTree樹(shù)刷新后展開(kāi)狀態(tài)不變
這篇文章主要為大家詳細(xì)介紹了如何基于cookie實(shí)現(xiàn)zTree樹(shù)刷新后,展開(kāi)狀態(tài)不變,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-02-02

