我正在尝试使圆圈内部透明/不透明。 我尝试添加不透明度:0.7(类似于我的页面覆盖),但它不能正常工作。
我想要的是让圆圈内部具有与页面叠加相同的透明度/不透明度效果。
关于如何做到的任何想法?
非常感谢
这是jsfiddle的链接:http://jsfiddle.net/6Lgujoo4/
这是我的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
#page-overlay {
background: none repeat scroll 0 0 #000;
cursor: pointer;
display: none;
height: 100%;
left: 0;
margin: 0 auto;
opacity: 0.7;
overflow: hidden;
position: fixed;
top: 0;
width: 100%;
z-index: 999998;
}
.loader {
font-size: 10px;
margin: 5em auto;
text-indent: -9999em;
width: 11em;
height: 11em;
border-radius: 50%;
background: #ffffff;
background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
position: absolute;
z-index: 1000000;
-webkit-animation: load3 1.4s infinite linear;
animation: load3 1.4s infinite linear;
top: 30%;
left: 50%;
}
.loader:before {
width: 50%;
height: 50%;
background: #FFF;
border-radius: 100% 0 0 0;
position: absolute;
top: 0;
left: 0;
content: '';
}
.loader:after {
background: #000;
width: 75%;
height: 75%;
border-radius: 50%;
content: '';
margin: auto;
opacity: 0.7;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
@-webkit-keyframes load3 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load3 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div style="text-align: center;">
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
<p>Tbe brown cow jump over the lazy dog.</p>
</div>
<div class="load-container load3">
<div class="loader">Loading...</div>
</div>
<div id="page-overlay" style="display:block;"></div>
</body>
</html>