【问题标题】:Opacity not working as expected不透明度没有按预期工作
【发布时间】:2016-10-11 12:02:33
【问题描述】:

我试图在 div 上设置不透明度,但它没有按预期工作。

https://jsfiddle.net/std0tgsy/1/

HTML

<div class="col-lg-offset-4 col-lg-3 col-md-6 col-sm-12 col-xs-12  haveaccount" style="opacity: 2;text-align: center;" >
  <h2>JOIN US AT START HERE, GO PLACES.</h2>
  <p>Sign up here, create your account, and we'll follow up with you to complete your profile. You'll 
  <br> have access to our tools  and can expect to receive some
  <br> freebies along the way, Welcome!</p>  

【问题讨论】:

标签: html css twitter-bootstrap


【解决方案1】:
div {
    opacity: 0.5;
}

<div style="background-color:rgba(0, 0, 0, 0.5);">
   <div>
      Text added.
   </div>
</div>

http://www.w3schools.com/cssref/css3_pr_opacity.asp & https://css-tricks.com/almanac/properties/o/opacity/

【讨论】:

    【解决方案2】:
    <div style="opacity: 2"; >
    

    加入我们,从这里开始,去往。

    <h2 style="opacity:0.2">JOIN US AT START HERE, GO PLACES.</h2>
    

    你也可以做外部 css 文件。

    Visit

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-12
      • 2018-01-16
      • 1970-01-01
      相关资源
      最近更新 更多