社交媒体图标未垂直对齐,而不是水平对齐

时间:2019-01-03 11:55:51

标签: html css

试图使侧边栏图标水平显示;他们对我来说是垂直出现的。 老实说,我不太了解我要复制和粘贴CSS的内容,但是我只希望列表顶部(如navbar)以及仅复制到每个页面上的侧边栏始终具有社交媒体链接。 //如果您不知道的话,华伦泰项目//

@import url('https://fonts.googleapis.com/css?family=Roboto:700');

body {

    margin: 0;

    padding: 0;

    display: flex;

    justify-content: center;

    align-items: top center;

    height: auto;

    background: #333;

    font-family: 'Roboto', sans-serif;

}



ul {

    margin: 0;

    padding: 0;

    display: flex;

}



ul li {

    list-style: none;

    margin: 0 20px;

    transition: 0.5s;

}



ul li a {
    top: 10%;

    display: block;

    position: relative;

    text-decoration: none;

    padding: 5px;

    font-size: 25px;

    font-family: 'Roboto', sans-serif;

    font-weight: bold;

    color: #fff;

    text-transform: uppercase;

    transition: 0.5s;

}



ul:hover li a {

    transform: scale(1.5);

    opacity: .2;

    filter: blur(5px);

}



ul li a:hover {

    transform: scale(2);

    opacity: 1;

    filter: blur(0);

}



ul li a:before {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: #ff497c;

    transition: transform 0.5s;

    transform-origin: right;

    transform: scale(0);

    z-index: -1;

}



ul li a:hover:before {

    transition: transform 0.5s;

    transform-origin: left;

    transform: scaleX(1);

}

.sidebar {
    height: 50px;
    width: 0;
    position: fixed;
    z-index: 1;
    bottom: 0%;
}

#katy-fb {
    display: block;
    text-indent: -9999px;
    width: 50px;
    height: 50px;
    background: url(/doodle-bop/Assets/icons/katy-fb.png);
    background-size: 50px 50px;
}

#geo-fb {
    display: block;
    text-indent: -9999px;
    width: 50px;
    height: 50px;
    background: url(/doodle-bop/Assets/icons/geo-fb.png);
    background-size: 50px 50px;
}

#katy-twit {
    display: block;
    text-indent: -9999px;
    width: 50px;
    height: 50px;
    background: url(/doodle-bop/Assets/icons/katy-twit.png);
    background-size: 50px 50px;
}

#geo-twit {
    display: block;
    text-indent: -9999px;
    width: 50px;
    height: 50px;
    background: url(/doodle-bop/Assets/icons/geo-twit.png);
    background-size: 50px 50px;
}

#insta {
    display: block;
    text-indent: -9999px;
    width: 50px;
    height: 50px;
    background: url(/doodle-bop/Assets/icons/instagram.png);
    background-size: 50px 50px;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/doodle-bop/Code/Styles/index.css">
  <title>Katy and Geo</title>
</head>

<body>
  <ul>
    <li><a href="#">Photos</a></li>
    <li><a href="#">Videos</a></li>
    <li><a href="#">Other</a></li>
    <li><a href="#">what</a></li>
  </ul>
  <div class="sidebar">
    <div class="social-icons">
      <a target="_blank" href="#"><span class="icon" id="insta"></span></a>
      <a target="_blank" href="#"><span class="icon" id="geo-twit"></span></a>
      <a target="_blank" href="#"> 
      <span class="icon" id="geo-fb"></span></a>
      <a target="_blank" href="#"><span class="icon" id="katy-twit"></span></a>
      <a target="_blank" href="#"> 
      <span class="icon" id="katy-fb"></span></a>
    </div>
  </div>
</body>

</html>

0 个答案:

没有答案