HTML CSS examples for CSS Layout:Responsive Layout
Responsive design for two figures
<html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .features_items {<!-- ww w. java 2s. c o m--> margin:0 auto; display:flex; flex-flow:row wrap; justify-content:center; align-items:center; } .features_item { flex-basis:36%; padding:201px 0 100px 0; text-align:center; position:relative; } .features_items h3 { padding-top:81px; color:Chartreuse; } .features_item_text { padding-top:16px; line-height:201%; } .features_items_person { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') top 21% center no-repeat; } .features_items_cloud { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') top 21% center no-repeat; } .features_items_database { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') top 21% center no-repeat; } .features_items_monitoring { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') top 21% center no-repeat; } .features_items_person:before, .features_items_cloud:before, .features_items_database:before, .features_items_monitoring:before { content:""; position:absolute; border-bottom:3px solid yellow; height:2px; width:16%; top:49%; left:44%; } </style> </head> <body translate="no"> <div class="features_items"> <figure class="features_item features_items_person"> <h3>Lorem ipsum </h3> <figcaption class="features_item_text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacu </figcaption> </figure> <figure class="features_item features_items_cloud"> <h3>Lorem ipsum dolo</h3> <figcaption class="features_item_text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacu </figcaption> </figure> <figure class="features_item features_items_database"> <h3>Lorem ipsum dolo</h3> <figcaption class="features_item_text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacu </figcaption> </figure> <figure class="features_item features_items_monitoring"> <h3>Lorem ipsum dol</h3> <figcaption class="features_item_text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacu </figcaption> </figure> </div> </body> </html>