为了账号安全,请及时绑定邮箱和手机立即绑定

为什么背景没有覆盖?

<!DOCTEPY html>

<html>

<head>

<meta charset="UTF-8">

<title>春节快乐</title>

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

</head>

<body>

<div id="music">

     <img src="123/music_pointer.png">

56b9d5030001a12a05000201.jpg

56b9d5030001129305000120.jpg

<img src="123/music_disc.png">

</div>

<div class="page" id="page1">

       <div clas="bg"></div>

       <div class="p1_lantern">点击屏幕<br></br>开启好运2016</div>

  <div class="p1_dog"></div>

  <div class="p1_words">2016年神烦狗贺新年</div>

  </div>

<div class="page" id="page2">

       <div clas="bg"></div>

       <div class="p2_circle"></div>

  <div class="p2_2016"></div>

       </div>

       <div class="page" id="page3">

       <div clas="bg"></div>

  <div calss="p3_logo></div>

       <div calss="p3_title></div>

  <div calss="p3_second></div>

  <div calss="p3_first></div>

  <div calss="p3_blessing></div>

  </div>

</body>

</html>





/* all tag */

* {

margin: 0;

padding: 0

border: none;

font-size: 1.15625vw;

font-family: "Microsoft Yahei";

}

html,

body {

height: 100%;

}

/* music */

 #music {

position: fixed;

top: 3vh;

right: 4vw;

z-index: 5;

        width: 15vw;

        height: 15vw;

        border: 4px solid #ef1639;

border-radius: 50%;

background: #fff;

}

 #music > img:first-of-type {

position: absolute;

top: 24%;

right :2.5%

width :28.421%;

 }

 #music > img:last-of-type {

position: absolute;

top: 0;

right :0;

bottom :0;

left: 0;

margin: auto;

width: 79%;

 }

 

/* page bg */

 .page{

height: 100%;

 }

 .page > .bg{

 position: absolute;

 width: 100%;

 height: 100%;

 }

 

/* page1 */

 #page1 > .bg {

  background: url("123/p1_bg.jpg") no-repeat center center;

  background-size: 100%;

 }

/* page2 */

page2 > .bg {

  background: url("123/p2_bg.jpg") no-repeat center center;

  background-size: 100%;

/* page3 */

page3 > .bg {

  background: url("123/p3_bg.jpg") no-repeat center center;

  background-size: 100%;



正在回答

1 回答

建议加一张图,就是你代码的效果,或者在runjs上弄个demo

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
HTML5+CSS3实现春节贺卡
  • 参与学习       109882    人
  • 解答问题       450    个

又逢新春佳节,春节贺卡搞起来,学会HTML5+CSS3实现春节贺卡

进入课程

为什么背景没有覆盖?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信