javascript - How to add different css to one html tag? -


i'm using 2 iframe tag in website. added css 1 tag

<style> iframe{     opacity: 0;     border: 0px none transparent;     position: absolute;     top: 300px;     left: 200px;     height: 300px;     width: 250px;     filter:alpha(opacity=0); } </style> 

but both iframes hidden.

i want show 1 iframe , hide one. how can that?

you can use ids if have simple page , don't have many styles maintain. below style tags iframes id attributes defined. id attributes used between style tags select iframe element want style id.

<style>    /* using id selector #iframeone */    #iframeone {      opacity: 0;      border: 0px none transparent;      position: absolute;      top: 300px;      left: 200px;      height: 300px;      width: 250px;      filter:alpha(opacity=0);    }  </style>    <!-- give id iframe want style. here it's iframeone -->  <iframe id="iframeone"></iframe>    <iframe id="iframetwo"></iframe>


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -