在Div中居中心链接

时间:2017-03-08 05:52:03

标签: css

我想编辑此代码,使链接水平和垂直放置在框的中心,同时它们之间的间距相等。



body {
  background: url("https://media.giphy.com/media/D6NH1CklRV44g/giphy.gif") no-repeat center center fixed;
  background-size: cover;
  -moz-background-size: cover;
  -webkit-background-size: cover;
  background-color: #0A0F14;
}

td {
  color: inherit;
  -moz-appearance: none;
}

a:link {
  color: inherit;
  text-decoration: none;
}

a:visited {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: inherit;
  text-decoration: none;
}

a:active {
  color: inherit;
  text-decoration: none;
}

a {
  font-family: "Segoe UI";
  font-size: 12px;
  font-weight: bold;
  outline: none;
  position: fixed;
}

td:hover {
  color: inherit;
  text-decoration: none;
}

li {
  display: inline;
  padding: 0px 30px;
}

.box {
  background: #10151B;
  border: 1px solid #080808;
  border-radius: 0px 0px 10px 10px;
  box-shadow: rgba(8, 8, 8, 0.5) 5px 5px 2px;
  position: fixed;
  width: 550px;
  height: 50px;
  top: 1px;
  left: 50%;
  transform: translate(-50%, 0%);
}

<table>
  <td class="box">
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #98D1CE">Link</a></li>
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #4ED1B3">Me</a></li>
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #98D1CE">Up</a></li>
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #4ED1B3">Fam</a></li>
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #98D1CE">Kill</a></li>
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #4ED1B3">Me</a></li>
    <li><a href="https://www.youtube.com/watch?v=RMICTAl4LCg" target="_blank" ; style="color: #98D1CE">Please</a></li>
    <li><a href="https://www.youtube.com/watch?v=9Deg7VrpHbM" target="_blank" ; style="color: #4ED1B3">Other</a></li>
  </td>
</table>
&#13;
&#13;
&#13;

0 个答案:

没有答案