Я пытаюсь создать светящийся пограничный эффект за. Точно так же, каждый. Button-Class также имеет :: перед псевдоэлементом для отдельного свечения. />.main-container
. Но :: перед элементами появляются над соответствующим их соответствующим контентом.CSS
*{
background-color: #0f0f2c;
color:aliceblue;
font-size: 20px;
}
body{
position: relative;
margin: 0;
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
z-index:auto;
}
.main-container{
height: 70vh;
width: 350px;
position: relative;
background-color: #0f0f2c;
isolation: isolate;
border-radius: 20px;
z-index:1;
}
.main-container::before{
content: “”;
position: absolute;
inset: -1px;
box-shadow: 0 0 2px #333399,
0 0 2px #ff00cc,
0 0 1px #fffb00,
0 0 2px #00f0ff,
0 0 15px #333399;
background-image: conic-gradient(#333399, #ff00cc, #fffb00, #00f0ff, #333399 );
background-color: #f0c0ff;
border-radius: 22px;
z-index:0;
}
.output-display-container{
position: relative;
height: 140px;
width: 100%;
border-radius: 20px;
display: flex;
justify-content: center;
align-items: center;
border: none;
z-index:2;
}
.display-div{
height: 100px;
width: 100%;
margin: 20px;
padding: 5px;
box-shadow: 0 0 5px #ff00cc;
border-radius: 10px;
text-align: right;
/color: #333;/
text-align: right; / aligns text to the right /
direction: ltr; / keeps the text flow left to right /
overflow-x: hidden; / Dont want a scrollbar */
white-space: normal; /*wraps text */
border: 1px solid #ccc;
}
.buttons-container {
position:ralative;
height: calc(70vh - 170px);
width: calc(100% - 40px);
/box-shadow: 0 0 10px #ff00cc;/
margin: 20px;
margin-top: 10px;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(5, 1fr);
gap: 10px;
z-index:2;
}
.button-class{
position:relative;
background-color: #0f0f2c;
box-shadow: 0 0 3px #ff00cc;
border: none;
border-radius: 8px;
cursor: pointer;
transition: transform 0.2s;
}
.button-class:hover {
transform: scale(1.05);
box-shadow: 0 0 5px #ff00cc;
}
.button-class::before{
content: “”;
position: absolute;
inset: -1px;
box-shadow: 0 0 2px #333399,
0 0 2px #ff00cc,
0 0 1px #fffb00,
0 0 2px #00f0ff,
0 0 15px #333399;
background-image: conic-gradient(#333399, #ff00cc, #fffb00, #00f0ff, #333399 );
background-color: #f0c0ff;
border-radius: 22px;
z-index:3;
}
< /code>
Пожалуйста, помогите !! . Класс. Все внутри .main-Container.
.>
Подробнее здесь: https://stackoverflow.com/questions/797 ... sing-corre
Упаковка CSS:-:: Перед псевдоэлементом появляется выше контент, несмотря на использование правильного Z-индекса [дублиро ⇐ Html
Программисты Html
1754073313
Anonymous
Я пытаюсь создать светящийся пограничный эффект за. Точно так же, каждый. Button-Class также имеет :: перед псевдоэлементом для отдельного свечения. />.main-container
. Но :: перед элементами появляются над соответствующим их соответствующим контентом.CSS
*{
background-color: #0f0f2c;
color:aliceblue;
font-size: 20px;
}
body{
position: relative;
margin: 0;
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
z-index:auto;
}
.main-container{
height: 70vh;
width: 350px;
position: relative;
background-color: #0f0f2c;
isolation: isolate;
border-radius: 20px;
z-index:1;
}
.main-container::before{
content: “”;
position: absolute;
inset: -1px;
box-shadow: 0 0 2px #333399,
0 0 2px #ff00cc,
0 0 1px #fffb00,
0 0 2px #00f0ff,
0 0 15px #333399;
background-image: conic-gradient(#333399, #ff00cc, #fffb00, #00f0ff, #333399 );
background-color: #f0c0ff;
border-radius: 22px;
z-index:0;
}
.output-display-container{
position: relative;
height: 140px;
width: 100%;
border-radius: 20px;
display: flex;
justify-content: center;
align-items: center;
border: none;
z-index:2;
}
.display-div{
height: 100px;
width: 100%;
margin: 20px;
padding: 5px;
box-shadow: 0 0 5px #ff00cc;
border-radius: 10px;
text-align: right;
/color: #333;/
text-align: right; / aligns text to the right /
direction: ltr; / keeps the text flow left to right /
overflow-x: hidden; / Dont want a scrollbar */
white-space: normal; /*wraps text */
border: 1px solid #ccc;
}
.buttons-container {
position:ralative;
height: calc(70vh - 170px);
width: calc(100% - 40px);
/box-shadow: 0 0 10px #ff00cc;/
margin: 20px;
margin-top: 10px;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(5, 1fr);
gap: 10px;
z-index:2;
}
.button-class{
position:relative;
background-color: #0f0f2c;
box-shadow: 0 0 3px #ff00cc;
border: none;
border-radius: 8px;
cursor: pointer;
transition: transform 0.2s;
}
.button-class:hover {
transform: scale(1.05);
box-shadow: 0 0 5px #ff00cc;
}
.button-class::before{
content: “”;
position: absolute;
inset: -1px;
box-shadow: 0 0 2px #333399,
0 0 2px #ff00cc,
0 0 1px #fffb00,
0 0 2px #00f0ff,
0 0 15px #333399;
background-image: conic-gradient(#333399, #ff00cc, #fffb00, #00f0ff, #333399 );
background-color: #f0c0ff;
border-radius: 22px;
z-index:3;
}
< /code>
Пожалуйста, помогите !! . Класс. Все внутри .main-Container.
.>
Подробнее здесь: [url]https://stackoverflow.com/questions/79721474/css-stacking-before-pseudo-element-appears-above-content-despite-using-corre[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия