简体   繁体   English

不透明图像在透明背景上

[英]Opaque image over Transparent Background

I want to make image opaque over 70% opaque background. 我想使图像不透明超过70%不透明背景。 I am working on tboxsolutionz.com/dev12345 我正在tboxsolutionz.com/dev12345上工作

When Portfolio item is clicked a div is loaded (Code for that div is given below) 单击投资组合项目时,将加载一个div(下面给出了该div的代码)

<div class="portfolio-modal modal fade transparent-background in" id="portfolioModal2" tabindex="-1" role="dialog" aria-hidden="false" style="display: block;"><div class="modal-backdrop fade in" style="height: 846px;"></div>
  <div class="modal-content">
  <!--  <div class="close-modal" data-dismiss="modal">
      <div class="lr">
        <div class="rl"> </div>
      </div>
    </div>-->
    <div class="container containerport">
      <div class="row">
        <div class="col-lg-8 col-lg-offset-2">
          <div class="modal-body"> 
            <!-- Project Details Go Here -->
            <h2>Monster Mischief</h2>
            <!--<p class="item-intro">Monster is up to a bit of mischief in the new endless runner game built for the pros & casual game players. Monster Mischief is insanely easy to pick up and play with a simple tap to control system. Simply navigate Monster through the obstacles while picking up sweet upgrades along the way to pimp out your character. Available now for your iPhone, iPod, & iPad.</p>-->
            <img class="img-responsive img-centered" src="img/portfolio/image11.jpg" alt="">
         <p class="zoom-text">Monster is up to a bit of mischief in the new endless runner game built for the pros &amp; casual game players. Monster Mischief is insanely easy to pick up and play with a simple tap to control system. Simply navigate Monster through the obstacles while picking up sweet upgrades along the way to pimp out your character. Available now for your iPhone, iPod, &amp; iPad.</p>
            <ul class="list-inline">
              <!--<li><strong>Client</strong>: John Doe</li>
              <li><strong>Category</strong>: Web Design</li>-->
              <li><a href="https://itunes.apple.com/us/app/monster-mischief/id852235026?mt=8" target="_blank"><img src="img/portfolio/App_Store.png" width="120" style="float:right;margin-right: 10px;" align="bottom"></a>
                            </li>
            </ul>
            <button type="button" class="btn btn-primary centered" data-dismiss="modal"><i class="fa fa-times"></i> Close</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

I have tried several aspects from css and html including z-index, making the background of the image white but nothing is working 我从css和html尝试了多个方面,包括z-index,使图像背景变白,但没有任何效果

try to give opacity:0.1; 尝试给opacity:0.1; to the image or try overlay div with same opacity. 图像或尝试以相同的不透明度覆盖div。

i did it by following styling 我通过遵循样式做到了

.fade.in
 {background-color:rgba(181,181,181,0.7)}
 .modal-content
 { z-index:15;
   background-color: white
  }

but this made the background of content white and rest area transparent 但这使内容白色和休息区的背景透明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM