0

HTML

<article class="block">
    <section class="sec1 flex"></section>
</article>

CSS:

html,body{
    margin:0px;
    padding: 0px;
}

body {
    margin-top: 2px;
    background-image: url("../img/f1.jpg");
    background-position: left top;
    background-size: 100% 100%;
}

a {
    text-decoration: none;
    color: white;
}

.wrapper {
    width: 85%;
    height: 100%;
    margin: 0px auto;
}

.block {
    background-color: rgba(0,0,0,0.52);
    padding: 5px;
    border: 2px solid #572c21;
    border-radius: 5px;
    color: white;
    font-family: 'Roboto', sans-serif;
    max-width: 100%;
    margin-bottom: 10px;
}

.flex {
    display: flex;
    justify-content:space-around;
    align-items: center;
}

header {
    height: 100px;
    text-align: center;
}

header h2,span {
    color: #c0893f;
}


nav {
    height: 65px;
}

nav .menu {
    height: 65px;
    font-size: 18px;
}

.menu a:hover {
    color: #c0893f;
    text-shadow: 2px 2px 2px rgba(150, 150, 150, 0.5);
    border-bottom: 2px solid #c0893f;
    border-radius: 2px;
}

.razdel {
    padding: 10px;
}

article {
    min-height: 400px;
}

section{
    min-width: 100%;
    min-height: 420px;
}

article .sec1{
    background-image: url(../img/f3.jpg) no-repeat;
}

footer {
    height: 50px;
}
1
  • Речь идёт о секции с классом .sec1, забыл указать в вопросе. 17 апр 2018 в 20:22

2 ответа 2

1

Сам нашёл ошибку, нужно было написать вместо background-image - просто background, для обобщения свойств.

1
  • На ошибку указали в комментарии)
    – RaZik
    17 апр 2018 в 20:27
0

либо

background: url(../img/f3.jpg) no-repeat;

либо

background-image: url(../img/f3.jpg);
background-repeat: no-repeat;

так как в background-image нужно указывать только ссылку на изображение, поэтому и перестает выводится

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.