1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<html> <head> <style> div.wrapper { width: 101px; height: 30px; } div.a, div.b { height: 20px; display: inline-block; } div.a { width: 20px; background: blue; } div.b { width: 80px; background: green; } </style> </head> <body> <div class="wrapper"> <div class="a"></div> <div class="b"></div> </div> </body> </html>