<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
div { | |
display: inline-block; | |
float: left; | |
background: silver; | |
width: 100px; | |
height: 100px; | |
margin: 20px; | |
font-size: 25px; | |
overflow: hidden; | |
line-height: 1; | |
white-space: nowrap; | |
text-align: right; | |
} | |
</style> | |
<div>Hello world! Hello world!</div> | |
<div>Hheelloo-wwoorrlldd!! Hheelloo-wwoorrlldd!! Hheelloo-wwoorrlldd!!</div> | |
<div>Hello</div> | |
<div>Hi</div> |