HTML CSS examples for CSS Layout:Responsive Layout
Responsive elements with CSS background-image
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <style id="compiled-css" type="text/css"> .outer {<!-- w w w .ja v a2 s . c o m--> width:501px ; height:164px; } section.field { width:100%; height:100%; background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat; background-size:contain; position:relative; } .player { font-size:2.3rem; position:absolute; } </style> </head> <body> <div class="outer"> <section class="field"> <i class="player" style="left: 28%; top: 14%;">L</i> <i class="player" style="left: 39%; top: 9%;">L</i> <i class="player" style="left: 58%; top: 9%;">L</i> <i class="player" style="left: 69%; top: 14%;">L</i> </section> </div> </body> </html>