如何为此布局制作网格(BS 4)?

时间:2019-03-12 19:03:21

标签: html css twitter-bootstrap bootstrap-4

我有这个布局 image here

目前,我尝试使用Bootstrap4做一个非常弯曲的布局

.o-bckg-white {
    background: #ffffff;
}

.o-rounded {
    -webkit-border-radius: 20px;
    border-radius: 20px;
}

.sidebar__profile {
    max-width: 25%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;

}

@media screen and (max-width:992px) {

  .sidebar__profile {
       margin-left: -25%;
       display: none;
  }

}


.sidebar__profile__image img {
  width: 115px;
  height: 115px;
  -webkit-border-radius: 50%;
          border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
}

.sidebar__profile__description {
  position: relative;
}

.sidebar__profile__description::before {
  content: '';
  width: 25%;
  border-bottom: 2px solid #56B0AA;

  position: absolute;
  left: -20px;
  top: 0;
}



.sidebar__profile__description__line {
  line-height: 1.2;
  font-family:'Gotham Pro';
  font-size: .85rem;
}


.sidebar__profile__icon  {
  opacity: .2;
  position: relative;
}

.sidebar__profile__icon img {
  width:  33px;
  height: 33px;
}


.sidebar__profile__icon:hover,
.sidebar__profile__icon.active {
  opacity: 1;
}

.sidebar__profile__icon span {
 
  font-size: 1rem;
  font-family: 'Gotham Pro'; 
}

.sidebar__friends__counter {
  z-index: 1;
  right: 100%;
  bottom: 22px;
  left: 0px;
}

.sidebar__news__counter {
  z-index: 1;
  top: -10px;
  left: 100%;
}


.sidebar__profile__donate {
  padding: 5px 15px;
}


.donate__button__image img {
  width: 30px;
}

.donate__button__caption {
  font-family:'Gotham Pro';
  font-size: .9rem;
}



.main-container {
  width: -webkit-calc(100% - 25%);
  width: calc(100% - 25%);
  min-height: 100vh;
  position: absolute;
  top: 0;
  right: 0;

}

@media screen and (max-width:992px) {

  .main-container {
    width: 100%;
  }



    

}

.profile-wrapper__bcg {
  background: url('../img/img-10.png') no-repeat;
  background-position: center center;
  height: 100%;
  -webkit-background-size: 100% 100%;
          background-size: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  /* justify-content: center; */
}

.profile-wrapper__align {
  position: absolute;
  top: 0;
  height: 70%;
  -webkit-transform: translate(0,24%);
      -ms-transform: translate(0,24%);
          transform: translate(0,24%);
  padding: 0% 10%;
}


.wrapper__link__news {
  -webkit-border-radius: 50%;
          border-radius: 50%;
  /*  width: 8vw;
  height: 8vw;*/
  height: 170px;
  max-width: 170px;
  position: absolute;
  z-index: 1;
  right: -4.5vw;
 /* top: 188px;*/
  top: 20%;
  /* padding: 0 21px; */
  /* background: aquamarine; */
  width: 50%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  border-radius: 50%;
}

.wrapper__link__news h2 {
  position: relative;
  line-height: 145px;
}

.wrapper__link__news:before {

  content: '';
  position: absolute;
  left: -22px;
  top: -21px;
  width: 219px;
  height: 210px;
  border-left: 12px dotted #ffffff00;
  border-right: 11px dotted #000000;
  border-top: 10px dotted #ffffff00;
  border-bottom: 11px dotted #000000;
  -webkit-border-radius: 50%;
          border-radius: 50%;
  -webkit-transform: rotate(135deg);
  -ms-transform: rotate(135deg);
  transform: rotate(135deg);
  }

.background-image {
    background-image: url(https://www.3nions.com/wp-content/uploads/2017/06/Untitled-2-1.png);
    -webkit-background-size: cover;
    background-size: cover;
    position: fixed;
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    overflow: auto;
    width: -webkit-calc(100% - 25%);
    width: calc(100% - 25%);
    min-height: 100vh;
}


.profile__link__news__icon {
 position: absolute;
 left: -8px;
 top: -16px;
}

.profile__link__search {
  height: 180px;
  text-align: center;
  -webkit-transform:rotate(45deg);
      -ms-transform:rotate(45deg);
          transform:rotate(45deg);
  width:180px;
  position: relative; 
  margin-left: 33px; 
}

.profile__link__search:before {
  content: "";
  position: absolute;
  border-bottom: 10px dotted #000000;
  width: 70%;
  height: 100%;
  z-index: 1;
  left: 0px;
  -webkit-transform: rotate(90deg);
      -ms-transform: rotate(90deg);
          transform: rotate(90deg);
}

.profile__link__message {
  width: 255px;
  height: 175px;
  -webkit-border-radius: 120px / 50%;
  border-radius: 120px / 50%;
  position: relative;

}

.profile__link__message__icon {
  position: absolute;
  left: 50%;
  -webkit-transform: translate(-50%,-50%);
      -ms-transform: translate(-50%,-50%);
          transform: translate(-50%,-50%);
}


.profile__link__portfolio__border:before {
    content: '';
    position: absolute;
    width: 50%;
    height: 220px;

    border: 10px dotted #000000;
    border-left: none;
    left: 0;

    top: -19px;
    z-index: -1;
}

.profile__link__portfolio {
  position: relative;
  width: 225px;
  height: 180px;
  text-align: center;
}

.profile__link__portfolio__icon {
  position: absolute;
  right: -30px;
  top: -30px;
}

.profile__link__portfolio input[type="checkbox"]:checked + .fa-eye-slash:before{
  content:"\f06e";
}

.profile__link__portfolio:before,
.profile__link__portfolio:after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  border-style: solid;
}

.profile__link__portfolio:before {
  border-color: transparent transparent transparent white;
  border-width: 65px 0 65px 200px;
}

.profile__link__portfolio:after {
  border-color: transparent white transparent transparent;
  border-width: 65px 205px 60px 0;
}

.profile__link__portfolio:after {
  border-color: transparent white transparent transparent;
  border-width: 62px 210px 62px 0;
}


.profile__link__friends {
    position: relative;
    height: 175px;
    width: 225px;
    -webkit-border-top-left-radius: 45%;
            border-top-left-radius: 45%;
    -webkit-border-bottom-left-radius: 45%;
            border-bottom-left-radius: 45%;  

}

.profile__link__friends:after {
    content: "";
    position: absolute;
    border-bottom: 10px dotted #000000;
    border-top: 10px dotted #000000;
    width: 50%;
    z-index: 1;
    right: 0;
    top: -24px;
    height: 220px;
}

.wrapper__link__text {
  color: #333;
  height: 100%;
  vertical-align: middle;
  width: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
      font-family: 'Bebas Neue Bold';

}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<body>
      <aside class="sidebar__profile o-bckg-white h-100 ">
         <div class="d-flex flex-column p-5 h-100 w-100 justify-content-between">
            <div class="p-5">
               <a href="#" class="d-block">
               <img class="main-wrapper__logo " src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSWmFwvX1ze7Rjq7YZujKJHaAjLFSReJzvpKMe-ivtduncDAd3GVg" alt="OpenSpace">
               </a>
               <div class="sidebar__profile__info pt-5 pb-4 ">
                  <div class="row align-items-center">
                     <div class="col-6">
                        <div class="sidebar__profile__image">
                           <img src="https://is1-ssl.mzstatic.com/image/thumb/Purple62/v4/0d/b1/29/0db129f7-1e21-1f05-a90a-cec6a03f7b87/source/512x512bb.jpg" alt="Profile image">
                        </div>
                     </div>
                     <div class="col-6">
                        <h2 class="o-first-blue o-fz-name m-0">John<br>John</h2>
                     </div>
                  </div>
               </div>
               <div class="sidebar__profile__description pt-4">
                  <p class="sidebar__profile__description__line">information1123123................<br>information1123123<br>information11231232234fsdfsdf</p>
                  <a href="#" class="sidebar__profile__description__line o-color-blue font-weight-bold o-transition">information1123123</a>
               </div>
               <div class="sidebar__profile__buttons pt-5 ">
                  <ul class="d-flex flex-wrap align-items-center">
                     <li class="col-3 py-3">
                        <a href="#" class="sidebar__profile__icon d-block o-transition o-scale  active">
                        <img src="img/user-info.svg" alt="user-info">
                        </a>
                     </li>
                     <li class="col-3 py-3 ">
                        <a href="#" class="sidebar__profile__icon d-block o-transition o-scale">
                        <img class="" src="img/active-messages.svg" alt="messages">
                        </a>
                     </li>
                     <li class="col-3 py-3 ">
                        <a href="#" class="sidebar__profile__icon d-block o-transition o-scale ">
                        <span class="o-color-red position-absolute sidebar__friends__counter">3</span>
                        <img class="" src="img/active-friends.svg" alt="Friends">
                        </a>
                     </li>
                     <li class="col-3 py-3 ">
                        <a href="#" class="sidebar__profile__icon d-block o-transition o-scale">
                        <img class="o-bounce-in" src="img/active-search.svg" alt="Search">
                        </a>
                     </li>
                     <li class="col-3 py-3">
                        <a href="#" class="sidebar__profile__icon d-block o-transition o-scale">
                        <span class="o-color-red position-absolute sidebar__news__counter">10</span>
                        <img class="" src="img/active-news.svg" alt="News">
                        </a>
                     </li>
                     <li class="col-3 py-3">
                        <a href="#" class="sidebar__profile__icon d-block o-transition o-scale">
                        <img class="" src="img/active-portfolio.svg" alt="Portfolio">
                        </a>
                     </li>
                  </ul>
               </div>
            </div>
            <div class="px-5 py-5">
               <div class="sidebar__profile__donate">
                  <a href="#" class="d-block o-scale o-transition">
                     <div class="donate__button__wrapper input-group align-items-center o-bckg-grey o-radius-tb-left">
                        <div class="donate__button__image p-2 o-bckg-black o-radius-tb-left">
                           <img src="img/donate.png" alt="Поддержать проект">
                        </div>
                        <span class="donate__button__caption o-color-black mx-auto">Помощь</span>
                     </div>
                  </a>
               </div>
            </div>
         </div>
      </aside>
      <main class="main-container " role="main">
         <div class="background-image vh-100">
            <div class="p-lg-5 p-md-5">
               <div class="p-lg-5 p-md-2">
                  <div class="container o-rounded o-bckg-white o-animateZoom">
                     <div class="p-5">
                        <section class="news-navigation">
                           <div class="row">
                              <div class="w-100">
                                 <nav class="navbar justify-content-between">
                                    <h2 class="o-fz-name m-0">information</h2>
                                    <ul class="control__buttons d-flex ">
                                       <a class="nav-link control__back o-transition o-scale" href="#">
                                       <img src="img/back.svg" alt="Back">   
                                       </a>
                                       <a class="nav-link control__cancel o-transition o-scale" href="#">
                                       <img src="img/cancel.svg" alt="Cancel">  
                                       </a>
                                    </ul>
                                 </nav>
                              </div>
                           </div>
                        </section>
                        <div class="user-container">
                          

                        </div>


                     </div>
                  </div>
               </div>
            </div>
         </div>
                                   
      </main>

   
</body>

谁能告诉我正确的方法?

我注意到补充工具栏固定在左侧

0 个答案:

没有答案
相关问题