Css Rotated Text With Background Shows Some Background-issues
I am using CSS to slightly rotate Text. The text is black on a white background, but because of the rotation part of the background has some little transparent lines going through
Solution 1:
Add a small inset box-shadow to avoid this issue (seems to do the job only on Chrome)
.item-heading {
/*Black text on white background*/box-shadow:
0005px#fff,
0002px#fff inset;
padding: 0;
background: #fff;
line-height: 2!important;
display: inline;
color: #000;
text-shadow: none;
}
.captionh3 {
/*Rotate Text*/transform: rotate(-3deg);
margin-bottom:15px;
}
body {
background:pink;
}
<divclass="caption caption-large"><h3><ahref="http://www.fair-fashion-magazin.de/2019/07/03/das-nachhaltige-mode-label-people-tree/"class="item-heading">Fashion zum Verlieben:<br> Das Fair Fashion Label People Tree</a></h3>
</div
Another idea is to consider border and rely on box-decoration-break
(pay attention to the support: https://caniuse.com/#feat=css-boxdecorationbreak)
.item-heading {
/*Black text on white background*/border:5px solid #fff;
padding: 0;
background: #fff;
line-height: 2!important;
display: inline;
color: #000;
text-shadow: none;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.captionh3 {
/*Rotate Text*/transform: rotate(-3deg);
margin-bottom:15px;
}
body {
background:pink;
}
<divclass="caption caption-large"><h3><ahref="http://www.fair-fashion-magazin.de/2019/07/03/das-nachhaltige-mode-label-people-tree/"class="item-heading">Fashion zum Verlieben: <br>Das Fair Fashion Label People Tree</a></h3>
</div
Post a Comment for "Css Rotated Text With Background Shows Some Background-issues"