Ich möchte das Element :after
Ziel, wenn ich über die #btn-home
Schaltfläche schweben.Ausrichtung: nach Element auf Hover
#btn-home a {
display: inline-block;
color: #707070;
font-size: 1.15em;
font-weight: 600;
margin: 0 20px;
}
#btn-home {
position: relative;
display: inline-block;
margin: 0;
}
#btn-home a:after {
display: block;
position: absolute;
content: '';
margin: 0 auto;
height: 3px;
width: 25px;
background-color: red;
bottom: -7px;
left: 0;
right: 0;
}
<div id="btn-home">
<a href="<?php echo get_home_url(); ?>">HOME</a>
</div>
Ich möchte die Breite des :after
Element zum Ziel, wenn sie über #btn-home
schwebte.
was war der Grund für die Abwärts Abstimmung? –