|
Sunday, July 7th, 2024
Search icons
Cascading Style Sheets(CSS)を使用してアイコンを実装します。
ご自由にご利用ください。
Previews
Examples html
<!-- icons -->
<div class="icons">
<div class="item"></div>
</div>
<!-- /icons -->
Examples css
/* - icons - */
.icons {
position: relative;
width: 25px;
height: 25px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
background-color: rgba(0, 0, 0, 0.0);
cursor: pointer;
}
.item {
display: block;
position: absolute;
top: 0px;
left: 0px;
width: 22px;
height: 22px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
background-color: rgba(0, 0, 0, 0.0);
border: 2px solid rgba(0, 0, 0, 1.0);
border-radius: 50%;
transform: rotate(-45deg);
transition: all .5s;
}
.item::before {
content: "";
display: block;
position: absolute;
top: 20px;
left: 8px;
width: 2px;
height: 8.5px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
background-color: rgba(0, 0, 0, 1.0);
border-radius: 0px 0px 1px 1px;
transition: all .5s;
}
.icons:hover .item {
border: 2px solid rgba(192, 192, 192, 1.0);
}
.icons:active .item {
border: 2px solid rgba(0, 0, 0, 1.0);
}
.icons:hover .item::before {
background-color: rgba(192, 192, 192, 1.0);
}
.icons:active .item::before {
background-color: rgba(0, 0, 0, 1.0);
}
/* - /icons - */
Summary
最後までご高覧いただきましてありがとうございました。
Cascading Style Sheets(CSS)を使用して実装するアイコンをご紹介させていただきました。
必要に応じて各コードを変更してご自由にご利用ください。
現場からは以上でした。