2016-06-21 7 views
-1

Wir ausgerichtet ein "Call to Action Box" div basierend auf Container Div.Es ist ordnungsgemäß in der normalen Browser-Ansicht ausgerichtet, aber Problem ist Wenn wir minimieren das Browserfenster "Call to Action" div ist nicht für den Benutzer sichtbar.Div Verstecken, wenn das Browserfenster zu minimieren

<div class="container"> 
<div class="PosRel"> 
      <div class="PosAbsol"> 
       <div class="MsgContainer"> 
          <div class="MsgDisplay">Call To Action</div> 
       </div> 
      </div> 
     </div> 
</div> 

CSS:

.container { 
    width: 100%; 
    margin: 0 auto; 
    vertical-align: top; 
    text-align: center; 
    font-size: 0; 
    position: relative; 
} 

.PosRel { 
    position: relative; 
} 

.PosAbsol { 
    position: absolute; 
    right: 0; 
} 

.MsgContainer { 
    position: fixed; 
    z-index: 9999; 
    opacity: 0; 
    transform: translateZ(0px); 
    transition: all 2s linear; 
} 

.MsgDisplay { 
    margin: 0px; 
    width: 200px; 
    height: 58px; 
    background-size: 100% 100%; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px; 
    font-weight: normal; 
    color: rgb(241, 241, 241); 
    text-decoration: none; 
    word-wrap: break-word; 
    z-index: 9999; 
    padding: 18px 15px; 
    font-weight: 600; 
    position: absolute; 
    right: 10px; 
} 
+2

Wenn Sie das Browser-Fenster minimieren die gesamte Seite nicht für den Benutzer sichtbar ist ... – nnnnnn

+0

was genau versuchen Sie hier zu tun? –

+0

Können Sie uns bitte wissen, was Ihre Anforderung ist. Ich habe dein HTML und CSS getestet. Es ist komplett mit Styling versaut. und Schriftfarbe ist auch weiß. – Samir

Antwort

0

sind, wollen Sie dies:)

@media only screen and (max-width:1230px) and (min-width:990px){ 
// CSS code 
} 
@media only screen and (min-width: 480px) and (max-width: 767px) { 
// CSS code 
} 
@media only screen and (max-width: 479px) { 
// CSS code 
} 
Verwandte Themen