2016-03-05 67 views
-1

所以今天我在我公司的網站上工作,我碰到一個錯誤:錨不起作用。當我刪除CSS時,它可以正常工作,但是當它在那裏時,那麼......你知道的。無論如何,因爲我不想顯示我的所有代碼。這裏只是CSS。再次,不知道什麼是錯的。請幫忙!錨的將不會工作

html { 
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/2/27/Abstract_-_Wall_(Imagicity_996).jpg"); 
    background-size: cover; 
    background-attachment: fixed; 
    font-family: sans-serif; 
} 

body { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center;    
    overflow-x: hidden; 
    margin: 0px; 
} 


.head { 
    z-index: -1; 
    position: fixed; 
    top: 200px; 
    left: 50%; 
    margin-left: -150px; 
    text-align: center; 
    color: white; 
} 

.head img { 
    width: 300px; 
} 

.bottom { 
    position: fixed; 
    width: 300px; 
    left: 50%; 
    top: 75%; 
    margin-left: -150px; 
} 

.bottom a > img { 
    margin: auto; 
    width: 50px; 
    height: 50px; 
    background-color: white; 
    border-radius: 360px; 
} 

.story { 
    width: 100%; 
    height: auto; 
    background-color: white; 
    margin-top: 100vh; 
    text-align: center; 
} 

.story .text { 
    width: 90%; 
    height: 100%; 
    background-color: white; 
    padding-top: 10px; 
    text-align: center; 
    margin: auto; 
} 

.story img { 
    display: inline-block; 
    height: 200px; 
    padding: 25px; 
} 

.story p { 
    margin: 0px; 
    margin-top: 10px; 
    background-color: white; 
} 

.story h2 { 
    width: 50%; 
    margin: 10px; 
    margin-top: 10px; 
    background-color: white; 
    margin: auto; 
} 

#product { 
    width: 100%; 
    height: 100%; 
} 

.nav h3 { 
    position: fixed; 
    top: 0px; 
    z-index: -1; 
    color: white; 
    padding: 5px; 
    display: inline-block; 
} 

.nav h3:hover { 
    text-decoration: underline; 
} 

回答

0

嗯......那些-1個z-索引看起來很有趣。你應該調查這些。