javascript - Creating responsive circle borders in CSS and/or jQuery -
i got psd our designers today following layout:
they want include 3 circles, evenly spaced, have responsive. every solution i've tried far has failed.
my code @ moment follows:
css (compiled scss)
.section2 .info-box { float: left; display: block; margin-right: 10.1484%; width: 26.56773%; } /* line 89, /users/chriswatson/.rvm/gems/ruby-2.1.5/gems/neat-1.7.2/app/assets/stylesheets/grid/_span-columns.scss */ .section2 .info-box:last-child { margin-right: 0; } @media screen , (max-width: 992px) { /* line 84, /users/chriswatson/sites/nuvi-website/source/stylesheets/index.css.scss */ .section2 .info-box { float: left; display: block; margin-right: 38.19821%; width: 100%; margin-bottom: 40px; background-color: rgba(250, 250, 250, 0.1); padding: 15px; } /* line 89, /users/chriswatson/.rvm/gems/ruby-2.1.5/gems/neat-1.7.2/app/assets/stylesheets/grid/_span-columns.scss */ .section2 .info-box:last-child { margin-right: 0; } } /* line 94, /users/chriswatson/sites/nuvi-website/source/stylesheets/index.css.scss */ .section2 .info-box img { height: 90px; margin-bottom: 20px; } /* line 99, /users/chriswatson/sites/nuvi-website/source/stylesheets/index.css.scss */ .section2 .info-box h2 { font-size: 1.2em; } /* line 103, /users/chriswatson/sites/nuvi-website/source/stylesheets/index.css.scss */ .section2 .info-box p { font-size: 18px; }
html
<div class="full-width"> <h1>a comprehensive solution</h1> <div class="info-box"> <div class="circle"> <img src="/images/timer.png" alt="timer" /> <h2>real-time</h2> <p>nuvi monitors 12 social networks , 4 million rss feeds in on 20 languages in real time.</p> <button class="learn-more">learn more</button> </div> </div> <div class="info-box themiddleone"> <div class="circle"> <img src="/images/multi-monitors.png" alt="monitors" /> <h2>visualizations</h2> <p>beautiful visualizations , dashboards make easy see actionable insights.</p> <button class="learn-more">learn more</button> </div> </div> <div class="info-box"> <div class="circle"> <img src="/images/server.png" alt="server" /> <h2>reporting</h2> <p>beautiful visualizations , dashboards make easy see actionable insights.</p> <button class="learn-more">learn more</button> </div> </div> </div>
how can circles appear pictured above?
you can viewport units
body { text-align: center; } div { width: 20vw; height: 20vw; margin: 2vw; border-radius: 50%; background: red; border: 1px solid grey; display: inline-block; }
<div></div> <div></div> <div></div>
Comments
Post a Comment