固定位置从图像中删除链接

时间:2016-07-07 01:44:43

标签: html css html5 css3

哟!所以我现在正在创建一个使用垂直标题的新网站,我想你可以说这是第一次,我遇到了一个问题,当我在图像上使用固定位置时链接从图像中删除。

提前致谢!



.header {
    width: 200px;
    height: 100%;
    background-color: #212121;
    top: 0;
    left: 0;
    position: fixed;
    -webkit-box-shadow: 2px 0px 1px 0px rgba(0,0,0,0.5);
    -moz-box-shadow: 2px 0px 1px 0px rgba(0,0,0,0.5);
    box-shadow: 2px 0px 1px 0px rgba(0,0,0,0.5);
}
.menu {

}
.menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.menu li {

}
.menu li a {
    display: block;
    text-decoration: none;
    background-color: #3AC6F4;
    padding: 15px 0 15px 10px;
    margin-top: 1px;
    color: white;
    transition: opacity .15s ease-in-out;
    -moz-transition: background-color .15s ease-in-out;
    -webkit-transition: background-color .15s ease-in-out;
}
.menu li a:hover {
    background-color: white;
    color: black;
}
.container1 {
    margin: 0 auto;
    width: 700px;
    
}
.footer {
    position: fixed;
    bottom: 30px;
    padding: 25px;
    height: 150px;
    width: 150px;
}
.footertext {
    text-align: center;
    padding-top: 5px;
}

<!DOCTYPE html>
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/style.css" rel="stylesheet">
<link href="css/images/favicon.ico" rel="shortcut icon">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Loom | Home</title>

</head>

<body>
    <div class="header">
        <div class="menu">
            <ul>
                <li><a href="index.html">HOME</a></li>
                <li><a href="index.html">PORTFOLIO</a></li>
                <li><a href="index.html">CONTACT</a></li>
            </ul>
        </div>
        <div class="footer">
            <a href="index.html"><img src="css/images/loombottomlogo.svg" alt="Logo"></a>
            <div class="footertext">
            @2016 ExLoom.<br/> All Rights Reserved.
            </div>
        </div>
    </div>

    <div class="container1">
        <div class="titlebackground">
            <div class="title">
                text
            </div>
        </div>

        <div class="titlep">
            text
        </div>
    </div>
    
    <div class="footer">
    
    </div>

</body>
</html>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:2)

我删除了额外的空<div class="footer">(HTML代码末尾附近的<div>元素中的最后<body>)并且有效。

你有两个<div class="footer">