2016-08-17 2 views
2

에 영향을주지 않고 배경 불투명도를 설정하는 방법 : enter image description here나는 기본적으로이를 만들려고하고있는 텍스트

추가 된 배경 이미지와 부모 컨테이너, 다음 필요로하는 아동 용기는 투명해야합니다. 여기

내 HTML :

<div class="scent-brand-contact"> 
    <div class="scent-brand-container">    
     <section id="black-studio-tinymce-8" class="widget-1 widget-first widget-odd widget widget_black_studio_tinymce"> 
      <div class="textwidget"> 
       <p>All our fragrances are developed in compliance with the International Fragrance Association ensuring strict adherence to safety purity and manufacturing standards.</p> 
       <p>LEARN MORE ABOUT HOW SCENT BRANDING CAN BENEFIT YOUR BUSINESS</p> 
      </div> 
     </section> 
     <section id="text-4" class="widget-2 widget-last widget-even widget widget_text"> 
      <div class="textwidget"> 
      <button type="button">contact us today</button> 
      </div> 
     </section>      
    </div> 
</div> 

그리고 CSS : 순간

.scent-brand-contact{ 
    position:relative; 
    background-image: url(images/lemon.jpg); 
    background-position: center center; 
    background-attachment: fixed; 
    background-size: cover; 
    min-height:380px; 
} 
.scent-brand-container { 
    background-color: #fff9c0; 
    padding: 10px; 
    opacity: 0.7; 
    padding-top: 5%; 
    margin: auto; 
    position: absolute; 
    top: 12%; 
    width: 100%; 
    min-height: 285px; 
} 

, 버튼과 텍스트는 불투명도를 받고 있는지 무슨 일이 일어나고. 텍스트와 버튼에 영향을주지 않으면 서 투명 배경을 어떻게 가질 수 있습니까?

+1

사용'RGBA()'색을 만들기 위해 rgba를 사용할 수 있습니다. – Aziz

답변

5

대신`#의 hex`의 배경 색상 투명, 예컨대 :

background: rgba(255, 249, 192, 0.7); 
관련 문제