I tried to create a circle that the border should look the same as the color of the div, and the space between the border and the div. Between the spaces, the background color of what has ever been on it should be displayed. the background color is variable, so we donβt have to hard code it.
Instead, I gave transparency using rgba mode. Everyone works fine, trying to get this effect when hovering, but I couldnβt get stuck, because I try to display:block hover and in normal state it is display:none; This is for the selector after so I tried this effect after the selector.
CODE CSS
.main{ width:80px; height:80px; border-radius:100%; background-color:#007eff; text-align:center; line-height:80px; } .main:hover + .main:after{ display:block; } .main:after{ width:86px; height:86px; border-radius:100%; background:rgba(255,255,255,0.1); border:2px solid #007eff; position:absolute; content:""; z-index:-1; top:3px; left:3px; display:none; } body{ background-color:#888; }
HTML
<div class="main"><i class="fa fa-camera-retro fa-lg"></i> </div>
PROBLEM STATUS ON HOVER it should become like IT with effects, if possible If there is any tutorial for this, I will be happy to find out. Thanks
html css css3
rram
source share