|
Sunday, December 15th, 2024
Pause icons
Cascading Style Sheets(CSS)を使用して角の丸いアイコンを実装します。
ご自由にご利用ください。
Previews
Examples html
<!-- icons -->
<div class="icons">
<button class="item" type="button" aria-label="pause"></button>
</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);
border: 2px solid rgba(0, 0, 0, 1.0);
-webkit-border-radius: 50%;
border-radius: 50%;
transition: all .5s;
cursor: pointer;
}
.icons button.item::before {
content: "";
display: block;
position: absolute;
top: 5px;
left: 6.5px;
width: 3px;
height: 11px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
background-color: rgba(0, 0, 0, 1.0);
-webkit-border-radius: 1.5px 1.5px 1.5px 1.5px;
border-radius: 1.5px 1.5px 1.5px 1.5px;
transition: all .5s;
}
.icons button.item::after {
content: "";
display: block;
position: absolute;
top: 5px;
left: 11.5px;
width: 3px;
height: 11px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
background-color: rgba(0, 0, 0, 1.0);
-webkit-border-radius: 1.5px 1.5px 1.5px 1.5px;
border-radius: 1.5px 1.5px 1.5px 1.5px;
transition: all .5s;
}
.icons:hover {
border: 2px solid rgba(192, 192, 192, 1.0);
}
.icons:hover button.item::before,
.icons:hover button.item::after {
background-color: rgba(192, 192, 192, 1.0);
}
.icons:active {
border: 2px solid rgba(0, 0, 0, 1.0);
}
.icons:active button.item::before,
.icons:active button.item::after {
background-color: rgba(0, 0, 0, 1.0);
}
/* - /icons - */
Summary
最後までご高覧いただきましてありがとうございました。
Cascading Style Sheets(CSS)を使用して実装する角の丸いアイコンをご紹介させていただきました。
必要に応じて各コードを変更してご自由にご利用ください。
現場からは以上でした。