CSS animation needs correction -
i appreciate if check below in codepen css animation. i'm trying make work better. want underline start below icon, not stuck window, have space right under first icon.
* { box-sizing: border-box; } body { font: 300 100% 'helvetica neue', helvetica, arial; } .container { width: 100%; margin: 0 auto; } ul li { display: inline; text-align: center; } { display: inline-block; width: 25%; padding: .75rem 0; margin: 0; text-decoration: none; color: #333; } .two:hover ~ hr { margin-left: 40%; } .one:hover ~ hr { margin-left: 12.5%; } .three:hover ~ hr { margin-left: 66%; } .four:hover ~ hr { margin-left: 75%; } hr { height: .25rem; width: 20%; margin: 0; background: tomato; border: none; transition: .3s ease-in-out; } .home-content-1{background-color: #f7f8f9; text-align: center;padding:5em 0em 2em;} .home-content-1 .row{margin-top: 2em;} .home-content-1 h3{font-weight: 700;text-transform: uppercase;color: #646464;font-size: 1.3125em;} .hc-icon{width: 150px;height: 150px;border-radius: 50%;margin: 0px auto 2.25em;} .hc-icon img{padding-top: 30px;} .hc-icon1{background: #b5d73c;} .hc-icon2{background: #32aaeb;} .hc-icon3{background: #ef3f54;} .circles li { padding: 10px;} hr { height: .25rem; width: 22%; margin-left: 12.5%; background: tomato; border: none; transition: .3s ease-in-out; }
<div class="home-content-1"> <div class="container"> <h1>the blabla approach</h1> <p>lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam.</p> <div class="row"> <div class="col span_1_of_4"> <ul class="circles"> <li class="one"><a href="#"> <div class="hc-icon hc-icon1"></div> <h3>demand generation</h3></a></li> <li class="two"><a href="#"><div class="hc-icon hc-icon1"> </div> <h3>demand generation</h3></a> </li> <li class="three"> <a href="#"> <div class="hc-icon hc-icon1"></div> <h3>demand generation</h3></a></li> <hr /> </ul> </div>
please see code here - http://codepen.io/anetk/pen/qyzlnb
personally, this. eliminated title stuff isolate you're trying do. substituted 'hr' element 'div'. changing div's relative position parent container feels lot safer changing margins on 'hr' element that's sized body. responsively sizes 'highlight' div 'li' elements. can adjust 'circles' container's margins , widths liking.
html:
<ul class="circles"> <li class="one"> <a href="#"> <div class="hc-icon hc-icon1"></div> <h3>demand generation</h3> </a> </li> <li class="two"> <a href="#"> <div class="hc-icon hc-icon1"></div> <h3>demand generation</h3></a> </li> <li class="three"> <a href="#"> <div class="hc-icon hc-icon1"></div> <h3>demand generation</h3> </a> </li> <div class="highlight"></div> </ul>
css:
body { font: 300 100% 'helvetica neue', helvetica, arial; margin:0; } .circles { display:inline-block; width:80%; margin:0 10%; padding:0; } .circles li { display:inline-block; list-style-type:none; text-align:center; width:33%; } .highlight { position:relative; left:0; height:5px; width:33%; background: tomato; transition: .3s ease-in-out; } { display: inline-block; width: 100%; margin: 0; text-decoration: none; color: #333; } .two:hover ~ .highlight { left: 33%; } .three:hover ~ .highlight { left: 66%; } .circles h3{font-weight: 700;text-transform: uppercase;color: #646464;font-size: 1.3125em;} .hc-icon{width: 150px;height: 150px;border-radius: 50%;margin: 0px auto 2.25em;} .hc-icon1{background: #b5d73c;} .hc-icon2{background: #32aaeb;} .hc-icon3{background: #ef3f54;}
Comments
Post a Comment