页脚文本装饰不起作用

时间:2017-09-04 03:07:23

标签: html css footer

我正在尝试设置页脚,但我无法删除文本下的行。我也想改变文字的颜色。我尝试在insert(at:)下使用text decoration:none,但这不成功。

.footer ul
h2 {
  text-align: center;
  font-family: "Courier New";
  color: beige;
  font-size: 50px;
  font-weight: 200;
  text-shadow: -2px -2px black;
  margin-bottom: -50px;
  position: relative;
}

.head-link {
  text-decoration: none;
  color: aliceblue;
}

.head-link:hover {
  margin: 20px auto 20px;
  position: relative;
  color: darkgoldenrod;
}

header {
  background-image: url(https://i.imgur.com/xD3POCF.jpg);
  position: absolute;
  background-position: center;
  max-width: 2000px;
  width: 100%;
  height: 100%;
  top: 0;
  background-repeat: no-repeat;
  background-size: cover;
  display: inline-block;
  bottom: 40px;
}

.header-image {
  background-size: cover;
}

.dropbtn {
  background-color: transparent;
  color: darkblue;
  padding: 10px;
  cursor: pointer;
  font-family: monospace;
  top: 0;
  font-size: 15px;
  width: 120px;
  height: 50px;
  border-color: black;
  border-style: double;
  align-content: center;
  text-align: center;
  margin-top: -10px;
}

.dropdown {
  display: inline-block;
  position: relative;
  margin-left: 15px;
}

.dropdown-content {
  padding: 12px;
  position: absolute;
  font-family: monospace;
  background-color: transparent;
  z-index: 1;
  display: none;
  min-width: 10px;
  text-align: left;
  left: 0;
}

.dropbtn:hover {
  color: white;
}

.dropdown-content a {
  color: #04116f;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 13px;
}

.dropdown-content a:hover {
  color: white;
}

.dropdown:hover .dropdown-content {
  display: block;
  text-decoration: underline;
}

.sidebar {
  display: block;
  position: relative;
  top: -650px;
  bottom: 0px;
  left: -30px;
  width: 120px;
  padding: 10px;
  background: transparent;
  z-index: 0;
}

.sidebar ul {
  cursor: pointer;
  list-style: none;
  color: white;
  line-height: 2;
}

body {
  margin: 0px;
  top: 0;
  width: 100%;
  max-height: 10%;
  background-image: url(http://i.imgur.com/yiMoYpV.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 20px 50px center;
  background-attachment: fixed;
}

.content {
  display: block;
  margin-right: 0px;
  padding: 0px;
  margin-bottom: 700px;
  position: relative;
  max-width: 1500px;
  max-height: 500px;
}

p {
  display: block;
  padding: 40px;
  position: relative;
  max-width: 500px;
  max-height: 500px;
  width: 100%;
  left: 50%;
  height: 200px;
  top: 120px;
  font-family: monospace;
  font-size: 15px;
  line-height: 2;
  margin-bottom: -70px;
  color: goldenrod;
  text-align: left;
}

.footer {
  margin: 100px 0 0 0;
  display: flex;
  flex-flow: row;
  justify-content: center;
  padding-bottom: 2px;
  align-content: space-between;
  background: transparent;
  overflow: hidden;
}

.footer ul {
  text-align: center;
  list-style: none;
  display: inline-flex;
  color: white;
  text-decoration: none;
}

正如您所见,文字装饰和颜色不起作用。

我该如何解决这个问题?

4 个答案:

答案 0 :(得分:1)

--save-dev

试试这个。

答案 1 :(得分:0)

您需要明确设置页脚中的链接样式。

10.12

答案 2 :(得分:0)

你需要添加这个css:

.footer ul li a {
  text-decoration:none;
}

答案 3 :(得分:0)

我已尽力了,这可能会根据您的要求(下划线和颜色)提供帮助:

在您的代码中添加此内容,

.footer ul li a {
  text-decoration: none;
  color: tan;
  padding: 5px;
  }
  
  .footer ul li a:hover {
    text-decoration: underline;
    }
    

感谢它是否足够有用。