Zizou
2016-06-18 16:08
/*all tag*/ *{ margin: 0; padding: 0; border: none; font-size: 1.5625vw; 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: #FFFFFF; } #music > img:first-of-type{ position: absolute; top: 24%; right: 2.5%; width: 28.421%; } #music > img:last-of-type{ position: absolute; top: 0;/*此项本为0*/ right: 0; bottom: 0; left: 0;/*此项本为0*/ width: 79%; margin: auto; } /*page bg*/ .page{ height: 100%; } .page > .bg{ position: absolute; z-index: -1; width: 100%; height: 100%; } /*page1*/ #page1 > .bg{ background: url(../img/p1_bg.jpg) no-repeat center center; background-size: 100%; } /*page2*/ #page2 > .bg{ background: url(../img/p2_bg.jpg) no-repeat center center; background-size: 100%; } /*page3*/ #page3 > .bg{ background: url(../img/p3_bg.jpg) no-repeat center center; background-size: 100%; }
我知道了 通配中的 margin:0 auto;这样就可以了
HTML5+CSS3实现春节贺卡
110057 学习 · 450 问题
相似问题