19/31

Не могу что-то понять как раскрасить в разные цвета маркеры около названий браузеров.

`html, body {
width: 550px;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
color: #333;
background: #f5f5f5;
}

main {
position: relative;
display: block;
width: 500px;
height: 300px;
margin: 0 auto;
}

h1 {
margin: 0;
margin-bottom: 10px;
padding: 10px 0;
}

.pie-container {
position: relative;
float: left;
height: 150px;
width: 150px;
border-radius: 50%;
box-shadow: 0px 1px 3px rgba(0,0,0,0.8);
}

.pie-container::before {
content: ‘’;
position: absolute;
top: 25%;
left: 25%;
z-index: 50;
width: 50%;
height: 50%;
color: white;
background-color: #f5f5f5;
border-radius: 50%;
box-shadow: 0px 0px 4px rgba(0,0,0,0.8) inset;
}

.pie {
position: absolute;
width: 100%;
height: 100%;
background-color: #AAA;
clip: rect(0px, 75px, 150px, 0px);
border-radius: 50%;
}

#safari {
z-index: 10;
background-color: #AAA;
transform: rotate(-20deg);
}

#ie {
z-index: 20;
background-color: #0074D9;
transform: rotate(160deg);
}

#firefox {
z-index: 30;
background-color: #FF851B;
transform: rotate(20deg);
}

#chrome {
z-index: 40;
background-color: #2ECC40;
transform: rotate(100deg);
}

ul {
float: left;
margin-left: 50px;
}

ul {
list-style: none;
}

li {
position: relative;
margin: 10px 0;
}

li::before {
content: ‘’;
position: absolute;
width: 15px;
height: 15px;
left: -25px;
top: 2px;
background-color: #AAA;
}

{
background-color: #2ECC40;
}

{
background-color: #FF851B;
}

{
background-color: #0074D9;
}`

Маркеры - это отдельные псевдоэлементы.
Общие стили определены:
li::before {
content: ‘’;
position: absolute;
width: 15px;
height: 15px;
left: -25px;
top: 2px;
background-color: #AAA;
}
Фон у всех получается #AAA. Вам остается переопределить фон для первых трех маркеров.
Например, селектор для первого будет li:first-child::before.
Дальше сами.

1 лайк

Спасибо! По этому пути и шел, только вот ошибка моя заключалась в том, что прописывал li::before:first-child и т.д.

Хотел еще попросить разобраться с сюрикенами