Jump to content
  • 0

Расположение картинки и фигур на сайте


Young
 Share

Question

 

Столкнулся с проблемой , когда вставил картинку , весь текст съехал в лево , а сама картинка , должна находиться с низу сайта

И еще вопрос , как сделать так , чтобы когда я уменьшал размер сайта , облаки оставались на своих местах ?

HTML

Скрытый текст
<section>
            <div class="wrapper">
                <div class="main">
                    <div class="main-text">
                        <p class="main-text__plan">PLAN YOUR LIFE</p>
                        <h1 class="main-text__head">Increase your <span class="main-text__head-bold">productivity</span></h1>
                        <p class="main-text__niz">Brute laoreet efficiendi id his, ea illum nonumes luptatum pro. Usu <br>
                             atqui laudem an, insolens gubergren similique est cu. Et vel modus <br>
                              congue vituperata.
                        </p>
                        <div class="main-text__play">
                            <div class="main-text__play-tringle">
                                
                            </div>
                        </div>
                        <div class="main-circle">
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                            <div class="main-circle__item"></div>
                        </div>  
                    </div>
                    <div class="main-lines"></div>
                </div>
            </div>
        </section>

 

CSS

Скрытый текст
.main {
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   margin: 0 auto;
   margin-top: 19px;
   background: linear-gradient(180deg, #F4F7FF 0%, #F1F5FF 100%);
   border: 1px solid #D8E3FE;
   max-width: 1441px;
}
 
.main-text {
   padding-top: 92px;
   padding-bottom: 284px;
}
 
.main-text__play{
   margin-top: 20px;
   border-radius: 50%;
   width: 52px;
   height: 52px;
   background: #FFFFFF;
   box-shadow: 0px 10px 50px rgba(201, 209, 231, 0.6);
   display: inline-block;
   position: relative;
}
.main-text__play-tringle{
   width: 10px;
   height: 11px;
   border-top: 6px solid transparent;
   border-left: 10px solid #5E81FF;
   border-bottom: 6px solid transparent;
   display: inline-block;
   position: relative;
   top: 20px;
   left: 2px;
}
.main-circle{
   
}
.main-circle__item:nth-child(1) {
   position: absolute;
    width: 45px;
   height: 23px;
   left: 253px;
   top: 172px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(2) {
   position: absolute;
   width: 74.5px;
   height: 76px;
   left: 0.5px;
   top: 256px;
   background: #fff;
   border-radius: 0 100% 0 0 / 0 100% 0 0; 
}
.main-circle__item:nth-child(3) {
   position: absolute;
   width: 19.78px;
   height: 10.18px;
   left: 307.22px;
   top: 466px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(4) {
   position: absolute;
   width: 23.44px;
   height: 11.95px;
   left: 253px;
   top: 478.48px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0; 
}
.main-circle__item:nth-child(5) {
   position: absolute;
   width: 49.64px;
   height: 24.82px;
   left: 261.27px;
   top: 476.18px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(6) {
   position: absolute;
   width: 32.63px;
   height: 16.55px;
   left: 294.37px;
   top: 484.45px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(7) {
   position: absolute;
   width: 103.47px;
   height: 51.81px;
   left: 1085px;
   top: 557.19px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(8) {
   position: absolute;
   width: 47.37px;
   height: 24.08px;
   left: 1158px;
   top: 545px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0; 
}
.main-circle__item:nth-child(9) {
   position: absolute;
   width: 68.02px;
   height: 34.54px;
   left: 1171px;
   top: 574.46px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0; 
}
.main-circle__item:nth-child(10) {
   position: absolute;
   width: 45px;
   height: 23px;
   left: 1257px;
   top: 166px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(11) {
   position: absolute;
   width: 77.81px;
   height: 39px;
   left: 1224px;
   top: 133px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.main-circle__item:nth-child(12) {
   position: absolute;
   width: 31px;
   height: 16px;
   left: 1208px;
   top: 117px;
   background: #fff;
   border-radius: 50% 50% 0 0 / 100% 100% 0 0; 
}
.main-circle__item:nth-child(13) {
   position: absolute;
   width: 74.5px;
   height: 76px;
   left: 1404px;
   top: 430px;
   background: #fff;
   border-radius: 100% 0 0 0 / 100% 0 0 0; 
}
 
 
.main-text__plan {
   font-family: 'Roboto';
   font-style: normal;
   font-weight: 500;
   font-size: 10px;
   line-height: 12px;
   letter-spacing: 0.1em;
   text-transform: uppercase;
   color: #3D4F9F;
}
 
.main-text__head {
   font-family: 'Quicksand';
   font-style: normal;
   font-weight: 300;
   font-size: 48px;
   line-height: 60px;
   text-align: center;
   color: #3D4F9F;
   padding-top: 16px;
   padding-bottom: 28px;
}
.main-text__head-bold{
   font-weight: 500;
}
 
.main-text__niz {
   font-family: 'Roboto';
   font-style: normal;
   font-weight: 400;
   font-size: 15px;
   line-height: 29px;
   text-align: center;
   letter-spacing: 0.03em;
   color: #8D96BD;
}
.main-lines{
   background-image: url(../../img/lines.svg);
   width: 1141px;
   height: 400px;
}

 

 

Без имени.png

решено 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Similar Content

    • By zeiger2
      Здравствуйте! У меня стоит задача, что при наведении на блок li строка должна поменять цвет, в том числе и картинка. Я меняю картинку с помощью 
      background-image: none;     background: url(../img/check_icon_red.png) left no-repeat;   Но теперь картинка позицианируется не там где должна, её можно поставить на место только вручную, через -100px. Нужно поставить ровно туда, где она была. Должна быть в одном ряду с другими
    • By Mix9
      есть див с 5 img, при уменьшении экрана див выходит за него. Я добавил overflow: auto для этого div в надежде на то, что я смогу прокручивать фотки с помощью скроллбара, однако даже с ним почему-то я не вижу часть фоток которые вышли за границу. Что с этим можно сделать? класс video повторяется 5 раз, я тут оставил только 1 
      .content{ width: 90%; background-color: #333; } .video{ margin: 0px 4px 0px 4px; width: 310; display: flex; flex-direction:column; } .video_button_text{ margin-top: 10px; display: flex; flex-direction: row; font-size: 20px; color: white; } .video_text_div{ display: inline-block; width: 250px; } .video_text{ text-align: justify-all; margin: 0px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .slidan_videos{ margin: 0px 10px 0px 20px; overflow: auto; width: auto; margin-bottom: 50px; display: flex; flex-direction: row; justify-content: space-around; } <div class="content"> <div class = slidan_videos> <div class = video> <div> <a href = 'ссылка'><img class="img" src=""картинка"></a> </div> <div class = video_button_text> <div class = avatarka_div> <a href="ссылка" target="_blank"><img class = avatarka src="картинка"></a> </div> <div class = video_text_div> <p class = video_text><a href="ссылка">текст</a></p> </div> </div> </div>
    • By Kaido
      Использую готовый плагин для модальных окон(от MaxGraph). Проблема в том, что когда у меня открыто два модальных окна, для примера Форма + Политика конфендициальности, и мне нужно закрыть политику вместе с ней закрывается и другое модальное окно. В JS я не сильно разбираюсь(собственно из за этого и использую готовый плагин), можете помочь кто работал с этим плагином? Я примерно понимаю как он работает, но реализовать чтобы закрывалось только одно не получается.
       
        <div class="content"> <button class="modal-btn" data-path="first" data-animation="fadeInUp" data-speed="1500">Открыть окно 1</button> </div> <div class="modal"> <div class="modal__wrapp" data-target="first"> <div class="modal__content"> <button class="modal__close">Закрыть</button> модальное окно <button data-path="policy">Политика</button> </div> </div> <div class="modal__wrapp" data-target="policy"> <div class="modal__content"> <button class="modal__close">Закрыть</button> политика </div> </div> </div> .modal { --transition-time: 0.3s; position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 1000; cursor: pointer; overflow-y: auto; overflow-x: hidden; text-align: center; opacity: 0; visibility: hidden; transition: opacity var(--transition-time), visibility var(--transition-time); } .modal__wrapp { display: none; cursor: default; width: fit-content; height: fit-content; } .modal__content{ position: absolute; left: 500px; width: 500px; height: 500px; display: flex; color: white; flex-direction: column; text-align: left; background-color: #000; } .modal__content button{ width: 200px; height: 50px; margin: 50px 0; } .modal.is-open { opacity: 1; visibility: visible; transition: opacity var(--transition-time), visibility var(--transition-time); } .modal__wrapp.modal-open { display: flex; } .disable-scroll { position: relative; overflow: hidden; height: 100vh; position: fixed; left: 0; top: 0; width: 100%; } .fade { opacity: 0; transition: opacity var(--transition-time); } .fade.animate-open { opacity: 1; transition: opacity var(--transition-time); } .fadeInUp { opacity: 0; transform: translateY(vw(-100)); transition: opacity var(--transition-time), transform var(--transition-time); } .fadeInUp.animate-open { opacity: 1; transform: translateY(0); transition: opacity var(--transition-time), transform var(--transition-time); } .modal__wrapp[data-target="policy"] .modal__content{ left: 1050px; background-color: #000; opacity: .5; } class Modal { constructor(options) { let defaultOptions = { isOpen: () => {}, isClose: () => {}, } this.options = Object.assign(defaultOptions, options); this.modal = document.querySelector('.modal'); this.speed = false; this.animation = false; this.isOpen = false; this.modalContainer = false; this.previousActiveElement = false; this.fixBlocks = document.querySelectorAll('.fix-block'); this.focusElements = [ 'a[href]', 'input', 'button', 'select', 'textarea', '[tabindex]' ]; this.events(); } events() { if (this.modal) { document.addEventListener('click', function(e){ const clickedElement = e.target.closest('[data-path]'); if (clickedElement) { let target = clickedElement.dataset.path; let animation = clickedElement.dataset.animation; if (clickedElement.classList.contains('modal-close')) { this.close(); } let speed = clickedElement.dataset.speed; this.animation = animation ? animation : 'fade'; this.speed = speed ? parseInt(speed) : 300; this.modalContainer = document.querySelector(`[data-target="${target}"]`); this.open(); return; } if (e.target.closest('.modal__close')) { this.close(); return; } }.bind(this)); window.addEventListener('keydown', function(e) { if (e.keyCode == 27) { if (this.isOpen) { this.close(); } } if (e.keyCode == 9 && this.isOpen) { this.focusCatch(e); return; } }.bind(this)); this.modal.addEventListener('click', function(e) { if (!e.target.classList.contains('modal__wrapp') && !e.target.closest('.modal__wrapp') && this.isOpen) { this.close(); } }.bind(this)); } } open() { this.previousActiveElement = document.activeElement; this.modal.style.setProperty('--transition-time', `${this.speed / 1000}s`); this.modal.classList.add('is-open'); this.disableScroll(); this.modalContainer.classList.add('modal-open'); this.modalContainer.classList.add(this.animation); setTimeout(() => { this.options.isOpen(this); this.modalContainer.classList.add('animate-open'); this.isOpen = true; this.focusTrap(); }, this.speed); } close() { if (this.modalContainer) { this.modalContainer.classList.remove('animate-open'); this.modalContainer.classList.remove(this.animation); this.modal.classList.remove('is-open'); this.modalContainer.classList.remove('modal-open'); this.enableScroll(); this.options.isClose(this); this.isOpen = false; this.focusTrap(); } } focusCatch(e) { const focusable = this.modalContainer.querySelectorAll(this.focusElements); const focusArray = Array.prototype.slice.call(focusable); const focusedIndex = focusArray.indexOf(document.activeElement); if (e.shiftKey && focusedIndex === 0) { focusArray[focusArray.length - 1].focus(); e.preventDefault(); } if (!e.shiftKey && focusedIndex === focusArray.length - 1) { focusArray[0].focus(); e.preventDefault(); } } focusTrap() { const focusable = this.modalContainer.querySelectorAll(this.focusElements); if (this.isOpen) { focusable[0].focus(); } else { this.previousActiveElement.focus(); } } disableScroll() { let pagePosition = window.scrollY; this.lockPadding(); document.body.classList.add('disable-scroll'); document.body.dataset.position = pagePosition; document.body.style.top = -pagePosition + 'px'; } enableScroll() { let pagePosition = parseInt(document.body.dataset.position, 10); this.unlockPadding(); document.body.style.top = 'auto'; document.body.classList.remove('disable-scroll'); window.scroll({ top: pagePosition, left: 0 }); document.body.removeAttribute('data-position'); } lockPadding() { let paddingOffset = window.innerWidth - document.body.offsetWidth + 'px'; this.fixBlocks.forEach((el) => { el.style.paddingRight = paddingOffset; }); document.body.style.paddingRight = paddingOffset; } unlockPadding() { this.fixBlocks.forEach((el) => { el.style.paddingRight = '0px'; }); document.body.style.paddingRight = '0px'; } } const modal = new Modal({ isOpen: (modal) => { console.log(modal); console.log('opened'); }, isClose: () => { console.log('closed'); }, });  
    • By stasN1
      Мне нужен такой результат :

      Не понимаю почему background не применяется вокруг иконок:

       
      Сам код:
      Html:
      css:

      Html:
      <section class="finish"> <div class="container"> <h2 class="finish_header">По окончании обучения Вы сможете!</h2> <div class="finish_divider"></div> <div class="finish_wrapper"> <finish_item> <div class="finish_round"> <img src="/icons/finish/1 (1).png" alt="" class="finish_icon"> </div> <div class="finish_descr">Создать свой сайт или блог</div> </finish_item> <finish_item> <div class="finish_round"> <img src="/icons/finish/2.png" alt="" class="finish_icon"> </div> <div class="finish_descr">Создать свой сайт или блог</div> </finish_item> <finish_item> <div class="finish_round"> <img src="/icons/finish/3.png" alt="" class="finish_icon"> </div> <div class="finish_descr">Обеспечить ему медленный, но верный рост в ТОП</div> </finish_item> <finish_item> <div class="finish_round"> <img src="/icons/finish/4.png" alt="" class="finish_icon"> </div> <div class="finish_descr">Достигнуть стабильного прироста посетителей</div> </finish_item> <finish_item> <div class="finish_round"> <img src="/icons/finish/5.png" alt="" class="finish_icon"> </div> <div class="finish_descr">Достигнуть стабильного прироста посетителей</div> </finish_item> </div> </div> </section>  
      Css:
      .finish .finish_wrapper { margin-top: 41px; display: flex; justify-content: space-between; } .finish .finish_wrapper .finish_item { width: 204px; } .finish .finish_wrapper .finish_item .finish_round { width: 115px; height: 115px; background-color: #b4e2ff; border-radius: 8px; } .finish_descr { font-family: Roboto; font-size: 17px; line-height: 20px; font-weight: 300; color: #efefef; Спасибо!
       

      Уже решил, спасибо!
      У меня CSS селектор вида:
      .finish .finish_wrapper .finish_item .finish_round

      А должен быть:
      .finish .finish_wrapper finish_item .finish_round
      Т.е. без точки перед finish_item, так как это не класс, а элемент
    • By Dos1er
      Приветствую! 
      Подскажите, плиз, как сделать чекбокс как на скрине? 
      Я новичок в верстке и что-то не могу разобраться в кастомизации данной штуки

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy