Иконки на HTML и CSS
Иконки для сайта без файлов SVG, PNG картинок на чистом HTML5 и CSS3.
[class^="icon-"] {
position: relative;
display: inline-block;
width: 48px;
height: 48px;
opacity: 0.54;
float: left;
}
[class^="icon-"] > div::before,
[class^="icon-"] > div::after,
[class^="icon-"]::before,
[class^="icon-"]::after {
content: "";
}
[class^="icon-"]::before,
[class^="icon-"] > div,
[class^="icon-"]::after {
position: absolute;
display: block;
background-color: black;
border: none;
transition: .3s ease-in-out;
}
position: relative;
display: inline-block;
width: 48px;
height: 48px;
opacity: 0.54;
float: left;
}
[class^="icon-"] > div::before,
[class^="icon-"] > div::after,
[class^="icon-"]::before,
[class^="icon-"]::after {
content: "";
}
[class^="icon-"]::before,
[class^="icon-"] > div,
[class^="icon-"]::after {
position: absolute;
display: block;
background-color: black;
border: none;
transition: .3s ease-in-out;
}
<div class="icon-menu"><div></div></div>
.icon-menu::before,
.icon-menu > div,
.icon-menu::after {
left: 15px;
width: 18px;
height: 2px;
}
.icon-menu::before{
top: 18px;
}
.icon-menu > div {
top: 23px;
}
.icon-menu::after{
top: 28px;
}
.icon-menu:hover > div {
opacity: 0;
}
.icon-menu:hover::before {
top: 23px;
transform: rotate(45deg);
}
.icon-menu:hover::after{
top: 23px;
transform: rotate(-45deg);
}
.icon-menu:hover {
cursor: pointer;
}
.icon-menu > div,
.icon-menu::after {
left: 15px;
width: 18px;
height: 2px;
}
.icon-menu::before{
top: 18px;
}
.icon-menu > div {
top: 23px;
}
.icon-menu::after{
top: 28px;
}
.icon-menu:hover > div {
opacity: 0;
}
.icon-menu:hover::before {
top: 23px;
transform: rotate(45deg);
}
.icon-menu:hover::after{
top: 23px;
transform: rotate(-45deg);
}
.icon-menu:hover {
cursor: pointer;
}
<div class="icon-close"><div></div></div>
.icon-close > div {
opacity: 0;
}
.icon-close > div,
.icon-close::before,
.icon-close::after {
top: 23px;
left: 15px;
width: 18px;
height: 2px;
}
.icon-close::before {
transform: rotate(45deg);
}
.icon-close::after{
transform: rotate(-45deg);
}
opacity: 0;
}
.icon-close > div,
.icon-close::before,
.icon-close::after {
top: 23px;
left: 15px;
width: 18px;
height: 2px;
}
.icon-close::before {
transform: rotate(45deg);
}
.icon-close::after{
transform: rotate(-45deg);
}
<div class="icon-more-vert"><div></div></div>
.icon-more-vert::before,
.icon-more-vert > div,
.icon-more-vert::after {
left: 22px;
width: 4px;
height: 4px;
border-radius: 2px;
}
.icon-more-vert::before {
top:16px;
}
.icon-more-vert > div {
top: 22px;
}
.icon-more-vert::after {
top: 28px;
}
.icon-more-vert > div,
.icon-more-vert::after {
left: 22px;
width: 4px;
height: 4px;
border-radius: 2px;
}
.icon-more-vert::before {
top:16px;
}
.icon-more-vert > div {
top: 22px;
}
.icon-more-vert::after {
top: 28px;
}
<div class="icon-more-horiz"><div></div></div>
.icon-more-horiz::before,
.icon-more-horiz>div,
.icon-more-horiz::after {
top: 22px;
width: 4px;
height: 4px;
border-radius: 2px;
}
.icon-more-horiz::before{
left: 16px;
}
.icon-more-horiz > div {
left: 22px;
}
.icon-more-horiz::after {
left: 28px;
}
.icon-more-horiz>div,
.icon-more-horiz::after {
top: 22px;
width: 4px;
height: 4px;
border-radius: 2px;
}
.icon-more-horiz::before{
left: 16px;
}
.icon-more-horiz > div {
left: 22px;
}
.icon-more-horiz::after {
left: 28px;
}
<div class="icon-person-outline"></div>
.icon-person-outline::before {
top: 16px;
left: 20px;
width: 4px;
height: 4px;
background-color: transparent;
border: 2px solid black;
border-radius: 50%;
}
.icon-person-outline::after {
bottom: 16px;
left: 16px;
width: 12px;
height: 3px;
background-color: transparent;
border: 2px solid black;
border-radius: 50% 50% 0 0;
}
top: 16px;
left: 20px;
width: 4px;
height: 4px;
background-color: transparent;
border: 2px solid black;
border-radius: 50%;
}
.icon-person-outline::after {
bottom: 16px;
left: 16px;
width: 12px;
height: 3px;
background-color: transparent;
border: 2px solid black;
border-radius: 50% 50% 0 0;
}
<div class="icon-person"></div>
.icon-person::before {
top: 16px;
left: 20px;
width: 8px;
height: 8px;
border-radius: 50%;
}
.icon-person::after {
bottom: 16px;
left: 16px;
width: 16px;
height: 6px;
border-radius: 50% 50% 0 0;
}
top: 16px;
left: 20px;
width: 8px;
height: 8px;
border-radius: 50%;
}
.icon-person::after {
bottom: 16px;
left: 16px;
width: 16px;
height: 6px;
border-radius: 50% 50% 0 0;
}
<div class="icon-search"></div>
.icon-search::before {
top: 15px;
left: 15px;
width: 9px;
height: 9px;
background-color: transparent;
border: 2px solid black;
border-radius: 50%;
}
.icon-search::after {
right: 15px;
bottom: 18px;
width: 9px;
height: 2px;
transform: rotate(45deg);
}
top: 15px;
left: 15px;
width: 9px;
height: 9px;
background-color: transparent;
border: 2px solid black;
border-radius: 50%;
}
.icon-search::after {
right: 15px;
bottom: 18px;
width: 9px;
height: 2px;
transform: rotate(45deg);
}
<div class="icon-check"></div>
.icon-check::before,
.icon-check::after {
width: 16px;
height: 2px;
}
.icon-check::before {
top: 23px;
left: 19px;
transform: rotate(-45deg);
}
.icon-check::after {
top: 27px;
left: 15px;
width: 8px;
transform: rotate(47deg);
border-radius: 0 0 1px 0;
}
.icon-check::after {
width: 16px;
height: 2px;
}
.icon-check::before {
top: 23px;
left: 19px;
transform: rotate(-45deg);
}
.icon-check::after {
top: 27px;
left: 15px;
width: 8px;
transform: rotate(47deg);
border-radius: 0 0 1px 0;
}
<div class="icon-arrow-back"><div></div></div>
.icon-arrow-back::before,
.icon-arrow-back > div,
.icon-arrow-back::after {
top: 23px;
left: 16px;
width: 10px;
height: 2px;
}
.icon-arrow-back::before {
top:19px;
transform:rotate(-45deg);
}
.icon-arrow-back > div {
left: 16px;
width: 16px;
border-radius:1px 0 0 1px;
}
.icon-arrow-back::after {
top: 27px;
transform: rotate(45deg);
}
.icon-arrow-back {
cursor: w-resize;
}
.icon-arrow-back > div,
.icon-arrow-back::after {
top: 23px;
left: 16px;
width: 10px;
height: 2px;
}
.icon-arrow-back::before {
top:19px;
transform:rotate(-45deg);
}
.icon-arrow-back > div {
left: 16px;
width: 16px;
border-radius:1px 0 0 1px;
}
.icon-arrow-back::after {
top: 27px;
transform: rotate(45deg);
}
.icon-arrow-back {
cursor: w-resize;
}
<div class="icon-arrow-forward"><div></div></div>
.icon-arrow-forward::before,
.icon-arrow-forward > div,
.icon-arrow-forward::after{
top: 23px;
left: 22px;
width: 10px;
height: 2px;
}
.icon-arrow-forward::before {
top: 19px;
transform: rotate(45deg)
}
.icon-arrow-forward > div{
left: 16px;
width: 16px;
border-radius: 0 1px 1px 0;
}
.icon-arrow-forward::after {
top: 27px;
transform: rotate(-45deg);
}
.icon-arrow-forward {
cursor: e-resize;
}
.icon-arrow-forward > div,
.icon-arrow-forward::after{
top: 23px;
left: 22px;
width: 10px;
height: 2px;
}
.icon-arrow-forward::before {
top: 19px;
transform: rotate(45deg)
}
.icon-arrow-forward > div{
left: 16px;
width: 16px;
border-radius: 0 1px 1px 0;
}
.icon-arrow-forward::after {
top: 27px;
transform: rotate(-45deg);
}
.icon-arrow-forward {
cursor: e-resize;
}
<div class="icon-search icon-zoom-in"><div></div></div>
.icon-zoom-in > div::before {
content: "";
position: absolute;
top: 21px;
left: 19px;
width: 5px;
height: 1px;
background-color: black;
}
.icon-zoom-in > div::after {
content: "";
position: absolute;
top: 19px;
left: 21px;
width: 1px;
height: 5px;
background-color: black;
}
.icon-zoom-in {
cursor: zoom-in;
}
content: "";
position: absolute;
top: 21px;
left: 19px;
width: 5px;
height: 1px;
background-color: black;
}
.icon-zoom-in > div::after {
content: "";
position: absolute;
top: 19px;
left: 21px;
width: 1px;
height: 5px;
background-color: black;
}
.icon-zoom-in {
cursor: zoom-in;
}
<div class="icon-search icon-zoom-out"><div></div></div>
.icon-zoom-out > div::before {
content: "";
position: absolute;
top: 21px;
left: 19px;
width: 5px;
height: 1px;
background-color: black;
}
.icon-zoom-out {
cursor: zoom-out;
}
content: "";
position: absolute;
top: 21px;
left: 19px;
width: 5px;
height: 1px;
background-color: black;
}
.icon-zoom-out {
cursor: zoom-out;
}
Иконки для сайта без файлов картинок SVG/PNG на чистом HTML5 с CSS3. Продолжение следует...