css在灰色透明的背景下,如何才能使上面的字的颜色为白色?

html-css010

css在灰色透明的背景下,如何才能使上面的字的颜色为白色?,第1张

楼主是对整个登录div设置了opacity,因此整个登录框都是半透明的。\x0d\x0a\x0d\x0a其实只需要给这个白色background的登录框改一下background-color就可以了:\x0d\x0a.login{\x0d\x0abackground-color:rgba(255,255,255,.5)\x0d\x0a\x0d\x0a}

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>景安</title>

<style type="text/css">

     .zzidc{color: whitebackground: redwidth: 200pxheight: 100px}

</style>

</head>

<body>

<div class="zzidc">设置字体白色</div>

</body>

</html>

css中,可以使用color属性来设置文章的颜色