CSS Property Value How to - opacity: 0.7;








Question

We would like to know how to opacity: 0.7;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of opacity</title>
<style type="text/css">
p {<!--  ww w. ja  va2s  .  c o m-->
  opacity: 0.7;
  padding: 10px;
  background: #00ff00;
}
</style>
</head>
<body>
  <p>
    This paragraph is 70% opaque (or 30% transparent). Play with
    <code>opacity</code>
    value to see how it works.
  </p>
</body>
</html>

The code above is rendered as follows: