2011-02-06 11 views
1

私は吹き出しの形のdivを持っています。ここでは、コードは次のようになります。divを透明にしますが、枠線を表示しておきます

ここ
<div class="dragThis" id="dragThis"> 
     <div class="content" id="content"> 
      <p> 
       <asp:Label ID="lblContent" runat="server" Text="Label"></asp:Label> 
      </p> 
     </div> 
     <div class="pointer"> 
      <div class="one"> 
      </div> 
      <div class="two"> 
      </div> 
     </div> 
    </div> 

は、CSSです:あなたが見ることができるようにここでの問題がある

<style type="text/css"> 



     .dragThis 
     { 
      width: 400px; 
      color: #efefef; 
      position: absolute; 
     } 
     .pointer 
     { 
      -moz-opacity: 0.5; 
      -khtml-opacity: 0.5; 
      filter: alpha(opacity=50); 
      height: 560px; 
     } 
     .dragThis .pointer 
     { 
      height: 35px; 
      background: #393939; 
     } 
     .dragThis .pointer div 
     { 
      height: 100%; 
      background: #ffffff; 
     } 
     .dragThis .pointer .one 
     { 
      width: 50%; 
      -moz-border-radius-topright: 35px; 
      -webkit-border-top-right-radius: 35px; 
      float: left; 
     } 
     .dragThis .pointer .two 
     { 
      width: 50%; 
      float: right; 
      -moz-border-radius-topleft: 35px; 
      -webkit-border-top-left-radius: 35px; 
     } 
     .dragThis .content 
     { 
      padding: 10px; 
      -moz-border-radius: 10px; 
      -webkit-border-radius: 10px; 
      background: #393939; 
      text-align: center; 
     } 
    </style> 

、吹き出しの下の部分は%50に表示されます。私は黒の部分を100%可視にし、他のすべての部分を透明にしたい。

ありがとうございます。

+0

@Downvoter - ちょうどいい.. – Pabuc

答えて

1

実用的な例が良いでしょう。

不透明度を別々の部分に分けることはできません。しかし、要素に背景がない場合は、境界を除いて透明になります。

0

不透明度の代わりに、rgba(255,255,255,0)などの最後の値を0として使用することができます。限り、不透明性は継承されていますが、rgba値はそうではありません。

関連する問題