mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
`background-size` per CSS-BACKGROUNDS § 3.9. Nearest neighbor interpolation is used for `crisp-edges`, like Firefox. A note has been added that we could do better if we wanted to. Multiple backgrounds are not yet supported.
20 lines
375 B
HTML
20 lines
375 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<!-- Tests that `image-rendering: pixelated` causes nearest-neighbor interpolation to be used. -->
|
|
<style>
|
|
img {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
image-rendering: -moz-crisp-edges; /* for testing in Firefox */
|
|
image-rendering: pixelated;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<img width=100 height=50 src=4x2.png>
|
|
</body>
|
|
</html>
|
|
|
|
|