仿糯米弹框效果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="关闭" href="javascript:close_dialog();"></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="">厦门</a>
<a href="">青岛</a>
<a href="">深圳</a>
<a href="">太原</a>
<a href="">重庆</a>
<a href="">武汉</a>
<a href="">南京</a>
<a href="">广州</a>
<a href="">沈阳</a>
<a href="">济南</a>
<a href="">哈尔滨</a>
</p>
<div class="moreCity"><a href="">很多其它城市>></a></div>
</div>
</div>
<div class="cityConfirm"><a title="開始团购" 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">点击这里看效果</p>
<br>
我是文字我是文字文字我字我是文字我是文字
</body>
</html>
仿糯米弹框效果demo的更多相关文章
- Android PopupWindow 仿微信弹出效果
项目中,我须要PopupWindow的时候特别多,这个东西也特别的好使,所以我今天给大家写一款PopupWindow 仿微信弹出效果.这样大家直接拿到项目里就能够用了! 首先让我们先看效果: 那么我首 ...
- JS遮罩层弹框效果
对于前端开发者来说,js是不可缺少的语言.现在我开始把我日常积累的一些js效果或者通过搜索自己总结的一些效果分享给大家,希望能够帮助大家一起进步,也希望大家能够多多支持! 1.今天我先分享一个遮罩层弹 ...
- onload + setTimeout 用法,制作广告弹框效果
一般来说,只有 <body>,<img>, <link>, <script>,<frame>, <frameset>, < ...
- android dialog 模拟新浪、腾讯title弹框效果
http://blog.csdn.net/jj120522/article/details/7764183 首先我们看一下新浪微博的效果(其它就是一个dialog): 点 ...
- iOS实现用控制器作为弹框效果(modalPresentationStyle)
如图: 中间模块其实为一个正常vc控制器,一般我们present,都是采用默认style 但如果要实现这种,写法如下: navigationC.modalPresentationStyle = UIM ...
- 在wpf中使用winrt的Toast弹框效果
源码地址:https://code.msdn.microsoft.com/windowsdesktop/Sending-toast-notifications-71e230a2/sourcecode? ...
- popupwindow 模拟新浪、腾讯title弹框效果
.jpg外部引用 原始文档 MainActivity.java外部引用 原始文档 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ...
- html5的audio实现高仿微信语音播放效果Demo
HTML部分: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <t ...
- iOS头条新闻App、自动布局、省市区联动、登录按钮动画、Alert弹框效果等源码
iOS精选源码 LEEAlert -- 优雅的Alert ActionSheet 登录按钮 省市区三级联动 JHViewCorner - 一行代码搞定圆角 JHFrameLayout - 一行代码实现 ...
随机推荐
- LDAP缓存命令
启动cacao及实例: [root@rusky bin]# cd /home/ldap/iamldap/dsee6/cacao_2/cacao/bin [root@rusky bin]# ./caca ...
- ArcGIS Server 9.3 安装(win7).
概述: 安装的过程还不算复杂,但是有个地方需要注意:就是防火墙.需要将 "本机的防火墙" 关掉, 并将 "杀毒软件关闭"(360和avira都会乱来,搞得我安了 ...
- SQL自连接(源于推荐算法中的反查表问题)
”基于用户的协同过滤算法“是推荐算法的一种,这类算法强调的是:把和你有相似爱好的其他的用户的物品推荐给你. 要实现该推荐算法,就需要计算和你有交集的用户,这就要用到物品到用户的反查表. 先举个例子说明 ...
- Swift--集合类型 数组 字典 集合
数组 1.创建一个数组 var someInts = [Int]()空数组 someInts = []清空 var threeDoubles = Array(repeating: 0.0, count ...
- HibernateTemplate常用方法总结
HibernateTemplate常用方法 (本文章内容相当于转载自:http://www.tuicool.com/articles/fU7FV3,只是整理了一下内容结构和修改了部分内容,方便阅读) ...
- struct可以拥有class般的构造函数
struct A { int a, b; A(int x, int y) :a(x), b(y){} }; int main() { A a(1, 2); cout << a.a < ...
- C++ list用法
创建一个list实例并赋值: // 创建实例以及赋值 #include <iostream> #include <list> using namespace std; int ...
- 如何在webstrom中配置eslint和less
webstrom 帮助文档(英文版) 1.在webstrom中使用ESLint规范代码格式: JSHint 可以帮助检测你的 JavaScript 代码中的错误和潜在的问题,而 eslint是一个 J ...
- 关于在transform下的子元素设置fixed无效的困惑
最近的项目是要实现一个点击显示隐藏边栏的效果,而且需要边栏随着滚动而滚动. 思路简单,不就一个css的动画和一个position为fixed,搞定!但不想,设为fixed的子元素竟然无法fixed,这 ...
- VNC配置连接远程服务器桌面-linux\windows
一.VNC配置连接远程服务器桌面 1.服务器安装VNC-server # yum -y install vnc-server 2.配置VNC连接登陆密码 # vncpasswd 回车 3.配置VNC- ...