Мой файл css/main.css правильно связан с моим файлом index.html, и весь код CSS внутри работает со всеми моими элементами HTML.
Однако я пытаюсь получить изображение, которое отображает информацию при наведении курсора, но это не работает — CSS не распознается, я считаю, что с классами какая-то проблема.
Код: Выделить всё
.box {
overflow: hidden;
position: relative;
}
.box:before {
content: "";
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: rgba(177, 208, 113, 0.8);
opacity: 0;
transition: all 300ms ease-in-out 0s;
}
.box:hover:before {
opacity: 1;
}
Код: Выделить всё
[i]
Sivan Chakravarty
Secretary General
[list]
[*][url=#][/i][/url]
[*][url=#][i][/i][/url]
[/list]
Edit: It seems to be working perfectly here. I'm using Sublime Text, everything is set right; but this just will not work on my browser. No errors in console, nothing.
Источник: https://stackoverflow.com/questions/424 ... ular-class