Which background will be visible in the div box if the following html markup is given:

 <div class="square" style="background-color: red !important;">
 </div>
and a CSS table is connected:

.square {
    width: 100px;
    height: 100px;
    background-image: url(img/square.jpg); /* picture size 100x100 pixels */
    background-color: black;
}
Explanation
The div element has the same width and height as the picture has.
That's why the picture will cover black background totally.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по HTML & CSS
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты