2016-09-16 46 views
0

嗨我試圖設置圖像被鎖定,這意味着我希望圖像不能被移動,雖然網站正在最小化。如何鎖定CSS上的圖像

我的CSS:

.header-shadow{ 
    background-image: url('../images/aTOP1.png'); 
    background-repeat: no-repeat; 
    width:180px; 
    height:180px; 
    left: 348px; 
    top: 705px; 
    position: absolute; 
    display: block; 

} 

HTML:

<ul class="clearfix"> 
        <li> 
        <div class="header-shadow"></div> 
        <span class="header_TOP1">星光傳奇</span> 
        </li> 
        <li> 
        <div class="header-shadow1"></div> 
        <span class="header_TOP2">鬼速戰</span> 
        </li> 
        <li> 
        <div class="header-shadow2"></div> 
        <span class="header_TOP3">時空之門</span> 
        </li> 
        <li> 
        <div class="header-shadow3"></div> 
        <span class="header_TOP4">91GAME</span> 
        </li> 
        <li><div class="header-shadow4"></div></li> 
        <li> 
        <div class="header-shadow5"></div> 
        <span class="header_TOP5">暗夜傳說</span> 
        </li> 
        <li> 
        <div class="header-shadow6"></div> 
        <span class="header_TOP6">KING</span> 
        </li> 
       </ul> 

形象,移動:

enter image description here

回答

0
.header-shadow{ 
    background-image: url('../images/aTOP1.png'); 
    background-repeat: no-repeat; 
    width:180px; 
    height:180px; 
    left: 348px; 
    top: 705px; 
    position: fixed; 
    display: block; 

} 
  • 只是將位置絕對改爲固定。