jQuery+CSS3仿IOS5通知中心

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 jQuery+CSS3仿IOS5通知中心 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

jQuery+CSS3仿IOS5通知中心

HTML代码(index.html):

<!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>NotificationCenter</title>

<link href="base.css"  type="text/css" rel="stylesheet" />

</head>

<body>

      <div class="notification">
            <div id="time"></div>
            <div class="content">
                  <div class="module weather">
                       <span class="city"><p class="local">Local Weather</p> <p>New York</p></span>
                       <img src="images/cloudy_0.png" alt="cloudy" title="cloudy" />
                       <div class="maxmin">
                             <span class="high">H:73°</span>
                             <span class="low">L:54°</span>
                       </div>
                      <span class="current">64°</span>
                      
                  </div>
                  
                  <div class="info">
                        <div class="module bar">
                             <img src="images/messages.png" title="messages"/><span>Messages</span><div class="close"></div>
                        </div>
                        <ul>
                             <li>Tom<span class="time">9:35 AM</span>
                                   <div class="message">Are your free tomorrow?</div>
                             </li>
                        </ul>
                  </div>
                  <div class="info">
                        <div class="module bar">
                             <img src="images/mail.png" title="mail" /><span>Mails</span><div class="close"></div>
                        </div>
                        <ul>
                            <li>Steve<span class="time">6:35 PM</span>
                                   <div class="message">That's a good idea!</div>
                            </li>
                        </ul>
                  </div>
                  <div class="info">
                        <div class="module bar">
                              <img src="images/reminders.png" title="reminders" /><span>Reminders</span><div class="close"></div>
                        </div>
                         <ul>   
                             <li>Lily<span class="time">10:35 PM</span>
                                   <div class="message">Birthday Party</div>
                             </li>
                        </ul>
                  </div>
                  <span class="center">No new notification</span>
                  <div class="clear"></div>
            </div>
            <div class="handle">
            <img src="images/handle.jpg" />
            </div>
      </div>
      <div class="container"></div>
    <script src="js/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>
</body>
</html>














JS代码(common.js):

// JavaScript Document$(function(){
	setInterval(function time(){
	var today=new Date();
	var h=today.getHours();
	var m=today.getMinutes();
	// add a zero in front of numbers<10m=checkTime(m);
	function checkTime(i){
	if (i<10){
	i="0" + i}
return i}
$("#time").html(h+":"+m);
}
,1000) var height = -$(".notification").height()+25;
	var width = (screen.width-$(".notification").width())/2;
	$(".notification").css({
	"top":height,"left":width}
);
	var y = 150;
	$(".handle").toggle(function vibrant(){
	if(y>1){
	y-=y*0.65$(".notification").animate({
	"top":0}
,70) .animate({
	"top":-y}
,70,vibrant);
}
else{
	$(".notification").animate({
	"top":0}
)}
}
,function(){
	height = -$(".notification").height()+25;
	width = (screen.width-$(".notification").width())/2;
	$(".notification").animate({
	"top":height}
,200);
	y=200;
}
) $(".close").click(function(){
	$(this).parents(".info").fadeOut(300);
}
)}
)

CSS代码(base.css):

*{margin:0;padding:0;}
body{background:url(images/bg-texture.jpg);}
.clear{clear:both;}
.container{width:900px;height:580px;background:url(images/features_notification_overview.png) center no-repeat;margin:30px auto;}
.notification{background:url(images/bg_tile.jpg);width:700px;height:auto;position:absolute;box-shadow:4px 4px 5px #000;border-radius:5px;}
/******************framework******************/
.content{width:700px;height:auto;}
.handle{cursor:pointer;text-align:center;}
.handle img{width:50px;height:25px;z-index:10;}
.module{background:url(images/bg.png);background:rgba(0,0,0,0.4);float:left;width:700px;height:110px;margin:10px 0 15px;font:400 18px "黑体";color:#FFF;border-radius:10px;text-align:center;line-height:110px;letter-spacing:4px;box-shadow:3px 2px 2px #000;text-shadow:2px 2px 2px #000;}
#time{margin:5px auto 0;height:20px;line-height:20px;font:300 20px "microsoft yahei";color:#FFF;text-align:center;text-shadow:2px 2px 2px #000;}
/******************weather******************/
.weather span{filter:alpha(opacity=100);width:80px;height:110px;display:block;margin:0 20px;line-height:110px;}
span.city{width:200px;height:110px;line-height:110px;float:left;font:bold 32px "microsoft yahei";margin:20px;}
p.local{font:bold 16px "microsoft yahei";color:#CCC;}
.weather img{display:block;margin:0 30px;float:left;}
.maxmin{float:left;height:90px;width:100px;padding:10px 0;}
span.high,span.low{font:300 20px 'DroidSans',Helvetica;line-height:30px;margin:0;width:100px;height:30px;margin:10px auto;}
span.current{width:100px;height:110px;margin:0;font:200 64px 'DroidSans',Helvetica;line-height:110px;float:left;}
/******************notification******************/
.bar{height:40px;margin:0;}
.bar img{width:40px;height:40px;display:block;float:left;}
.bar span{display:block;font:600 18px "microsoft yahei";line-height:40px;letter-spacing:2px;float:left;margin:0 5px;}
.close{width:30px;height:30px;margin:5px;background:url(images/close.png);float:right;display:block;border-radius:20px;box-shadow:1px 2px 2px #000;cursor:pointer;}
.content ul{width:650px;height:auto;float:left;list-style:outside url(images/point.png);margin:0 30px;}
.content li{padding-left:10px;height:60px;font:600 18px "microsoft yahei";line-height:30px;color:#FFF;}
.message{display:block;font:600 16px "microsoft yahei";line-height:30px;color:#CCC;}
span.time{float:right;font:600 16px "microsoft yahei";line-height:60px;color:#FFF;}
.center{display:block;float:left;width:680px;height:50px;margin:10px auto;font:400 20px "microsoft yahei";color:#FFF;text-align:center;border-radius:10px;text-shadow:2px 2px 2px #000;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
678.87 KB
Html CSS3特效
最新结算
HTM5 Canvas实现3D飞机飞行动画特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
HTM5 Canvas实现3D飞机飞行动画特效代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery图像缩放工具插件Zoomer特效代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery图像缩放工具插件Zoomer特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
Labelauty–jQuery单选框_复选框美化插件特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
Labelauty–jQuery单选框_复选框美化插件特效代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery网页版打砖块小游戏源码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery网页版打砖块小游戏源码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章