css+jquery实现自适应考试倒计时全屏页面代码
代码语言:html
所属分类:布局界面
代码描述:css+jquery实现自适应考试倒计时全屏页面代码
代码标签: css jquery 自适应 考试 倒计时 全屏
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Marck+Script|Roboto:100,400,500,900'> <style> * { box-sizing: border-box; margin: 0; font-family: 'Roboto', sans-serif; } h1, p, h2, h3, h4, ul, li, div { margin: 0; padding: 0; } body{ margin:0px; background-image: url(//repo.bfw.wiki/bfwrepo/image/5e44fe08140e7.png); background-repeat: no-repeat; background-size: cover; } .wrap{ display:none; } .logo div{ text-transform:uppercase; } .logo .cx{ font-size: 50px; color: #535353; margin: 10px 10px 0px; font-weight: 900; } .logo .cd{ font-size: 32px; color: #535353; margin: -40px 139px 0px; font-weight: 900; } .logo .line{ position: absolute; height: 1px; width: calc( 100% - 350px ); background: #535353; margin: -15.5px 165px; } .logo .line .days{ text-align: center; font-size: 16px; font-weight: 900; color: #000000; margin: -18px 10px; } .logo .cc{ font-size: 32px; color: #b51936; margin: -14px 12px 0px; font-weight: 400; } .social{ float: right; position: absolute; right: 0px; margin: -25px 40px; } .social a{ text-decoration:none; } .social i{ color: #535353; margin:0px 8px; } main .container{ width: 1200px; margin: 100px auto; } .counter-box{ } .counter-box .message:nth-of-type(1){ width: 200px; border-left: 1px solid black; padding: 0px 25px; } .counter-box .message:nth-of-type(3){ margin: 65px 0px; text-align: right; width: 100%; } .counter-box .message:nth-of-type(4){ margin: -60px 0px; text-align: right; width: 100%; } .counter-box .message span{ font-size: 28px; color: #111; text-transform: uppercase; letter-spacing: 10px; text-align: center; } .counter-box .message span b{ font-weight: normal; letter-spacing: 10px; } .counter-box .message span b:before{ content: ""; position: absolute; width: 180px; height: 3px; background: #b51936; transform: rotate(-1deg); margin: 15px -5px; } #counter{ display: flex; margin: 80px 0px 120px; } .day, .hou, .min, .sec{ width: 100%; } #counter .time{ color: #b51936; padding: 10px; font-size: 137px; float: left; width: 100%; text-align: center; font-weight: 900; } #counter .call{ font-size: 20px; color: #535353; text-transform: uppercase; float: left; margin: -15px 10px 0px; text-align: center; width: 100%; } header .container{ margin: 40px; } .pulse{ color:red; animation: pound 0.35s infinite alternate; -webkit-animation: pound 0.35s infinite alternate; } @-webkit-keyframes pound { to { transform: scale(1.1); } } @keyframes pound { to { transform: scale(1.1); } } .loading-page { background: #FFF; width: 100vw; height: 100vh; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } .loading-page .counter { text-align: center; } .loading-page .counter h1 { color: #080808; font-size: 20px; margin-top: -10px; } .loading-page .counter hr { background: #080808; border: none; height: 1px; } .loading-page .counter { position: relative; width: 200px; } .loading-page .counter h1.abs { position: absolute; top: 0; width: 100%; } .loading-page .counter .color { width: 0px; overflow: hidden; color: #f60d54; } @media only screen and (max-width: 1300px){ main .container { width: 900px; margin: 90px auto; } #counter .time { color: #b51936; padding: 10px; font-size: 100px; float: left; width: 100%; text-align: center; font-weight: 900; } #counter .call { font-size: 15px; color: #535353; text-transform: uppercase; float: left; margin: -15px 10px 0px; text-align: center; width: 100%; } .counter-box .message span { font-size: 20px; color: #535353; text-transform: uppercase; letter-spacing: 10px; text-align: center; } .counter-box .message span b:before { content: ""; position: absolute; width: 148px; height: 3px; background: #b51936; transform: rotate(-1deg); margin: 11px -5px; } } @media only screen and (max-width: 900px){ main .container { width: 600px; margin: 90px auto; } #counter .time { color: #b51936; padding: 10px; font-size: 65px; float: left; width: 100%; text-align: center; font-weight: 900; } #counter .call { font-size: 12px; color: #535353; text-transform: uppercase; float: left; margin: -15px 10px 0px; text-align: center; width: 100%; } .counter-box .message span { font-size: 20px; color: #111; text-transform: uppercase; letter-spacing: 10px; text-align: center; } .counter-box .message span b:before { content: ""; position: absolute; width: 112px; height: 3px; background: #b51936; transform: rotate(-1deg); margin: 11px -5px; } footer{ margin: 130px 0px; } footer main .container { font-size: 12px; } } @media only screen and (max-width: 600px){ .........完整代码请登录后点击上方下载按钮下载查看
网友评论0