0
提供的div内的字体是像素化的(h3,p)。我不认为它是我的电脑或浏览器设置,因为div外的字体不是像素化的。像素化的外观发生在将div放在.popupBoxWrapper中屏幕中间的位置之后。这里是与div相关的代码,任何想法可能会导致问题?将div放在屏幕中间后,字体变为像素化
HTML:
<div id="popupBoxOnePosition">
<div class="popupBoxWrapper">
<div class="popupBoxContent">
<a href="javascript:void(0)" onclick="toggle_visibility('popupBoxOnePosition');">
<button class="close" onclick="document.getElementById('popup').style.display='none'">X</button>
</a>
<h3>Title</h3>
<p>Example</p>
<p>lineone</p>
<p style="font-size: 15px;">Follow us on Instagram @sharegoodmessages</p>
<p style="font-size: 15px;">Follow us on Twitter @SgmEnglish</p>
<br>
<p style="font-size: 15px;">Developed by example</p>
</div>
</div>
</div>
<div id="wrapper">
<a class="icon" href="javascript:void(0)" onclick="toggle_visibility('popupBoxOnePosition');"><img src="info_button.png"></img>
</a>
</div>
CSS:
#popupBoxOnePosition{
top: 0;
left: 0;
width: 100%;
height: 120%;
display: none;
position:fixed;
z-index: 1;
overflow: hidden;
}
.popupBoxWrapper{
display: block;
width: 500px;
text-align: left;
position:fixed;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.popupBoxContent{
background-color: GhostWhite;
padding: 15px;
padding-left: 35px;
padding-right: 35px;
display: block;
}
.close{
border:0px;
float: right;
color: black;
cursor: pointer;
background-color: GhostWhite;
display: block;
position: absolute;
top: 18px;
right: 25px;
text-align: right;
margin: 0;
padding: 0;
text-decoration: none;
white-space:pre-wrap;
}