<!DOCTYPE html> | |
<html> | |
<!-- | |
| Apply overflow hidden and opacity at the same time. | |
| https://www.w3.org/TR/CSS21/visufx.html | |
--> | |
<head> | |
<style> | |
body { | |
font-family: Roboto; | |
font-size: 16px; | |
} | |
.hidden { | |
width: 330px; | |
height: 20px; | |
overflow: hidden; | |
} | |
.opacity { | |
opacity: 0.5; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="hidden opacity"> | |
<div> Demonstrate overflow hidden and opacity. This line with opacity 0.5. </div> | |
</div> | |
</body> | |
</html> |