I have the following page: fiddle. As it stands, Chrome (47.0.2526.106 m) renders the fixed header text using gray-scale anti-aliasing:
While I want to maintain the "default" anti-aliasing you get without using any kind of 3D transforms:
In the linked fiddle, this is possible using these options:
- Removing
transform: perspective(900px) rotateY(-30deg);
from.img
- Removing
z-index: 999;
from the#header
(for whatever reason this does not work in fiddle, so you have to show it in a dedicated browser tab using the copy-pasta code below) - Removing
position: fixed;
from the#header
(also does not work in fiddle)
However, all these options have a huge visual impact on other parts of the page which I want to avoid. So my question is, how can I keep the "default" anti-aliasing (whatever the proper term for this type of AA is), while also being able to use z-index/fixed position/rotateY?
HTML:
<div id="header">
blah BLAH blah
</div>
<div class="img"></div>
CSS:
#header {
width: 100%;
position: fixed;
top: 0;
z-index: 999;
background: #ccc;
box-shadow: 0 0 1em 0 #000;
text-align: center;
}
.img {
width: 200px;
height: 200px;
transform: perspective(900px) rotateY(-30deg);
background: black;
}
.html file (for the z-index/position trick)
<!DOCTYPE html>
<html lang="en">
<head>
<style>
#header {
width: 100%;
position: fixed;
top: 0;
z-index: 999;
background: #ccc;
box-shadow: 0 0 1em 0 #000;
text-align: center;
}
.img {
width: 200px;
height: 200px;
transform: perspective(900px) rotateY(-30deg);
background: black;
}
</style>
</head>
<body>
<div id="header">
blah BLAH blah
</div>
<div class="img"></div>
</body>
</html>