2015-04-01 225 views
0

嗨,在下面的代碼中,我想顯示圖像左側,文本應該是右側。但現在它顯示的是圖像。以及3張圖像在單行中與圖像和文本相同。如何在html中顯示圖像和左側以及文本右側

.specilites{ 
 
    width: 1050px; 
 
    margin: 0 auto 0 auto; 
 
    padding-top:7px; 
 
    color:#008080; 
 
    font-size:30px; 
 
} 
 
.specilites img{ 
 

 
    background-repeat: no-repeat; 
 
    background-size: cover; 
 
    overflow:hidden; 
 
    -webkit-border-radius:50px; 
 
    -moz-border-radius:50px; 
 
    border-radius:50px; 
 
    width:90px; 
 
    height:90px; 
 
    display:inline-block; 
 
    border: 1px solid #008080; 
 
} 
 
.specilites h1{ 
 
    width: 1050px; 
 
     margin: 0 auto 0 auto; 
 
     padding-top:7px; 
 
     color:#008080; 
 
     font-size:30px; 
 
    } 
 
    .specilites td{ 
 
     font-size:15px; 
 
     display:block; 
 

 
    }
<div class="specilites"> 
 
    <table> 
 
     <tr> 
 
     <td> 
 
     <img src="http://lorempixel.com/400/200"/> 
 
     Accident & Emergency Care</td> 
 
     <td><img src="http://lorempixel.com/400/200"/></td> 
 
     <td> <img src="http://lorempixel.com/400/200"/><td> 
 
     </tr> 
 
     <img src="http://lorempixel.com/400/200"/> 
 
     <img src="http://lorempixel.com/400/200"/> 
 
     <img src="http://lorempixel.com/400/200"/> 
 
     <img src="http://lorempixel.com/400/200"/> 
 
     <img src="http://lorempixel.com/400/200"/> 
 
     <img src="http://lorempixel.com/400/200" /> 
 
     <img src="http://lorempixel.com/400/200" /> 
 
      <img src="http://lorempixel.com/400/200" /> 
 
      <img src="http://lorempixel.com/400/200" /> 
 
      <img src="http://lorempixel.com/400/200" /> 
 
       <img src="http://lorempixel.com/400/200" /> 
 
      <img src="http://lorempixel.com/400/200" /> 
 
      <img src="http://lorempixel.com/400/200" /> 
 
     </table> 
 
</div>

回答

1

假設你想在一個單一的線和圖像3幅圖像留下的文字從右到這一點。 DEMO Here

.specilites{ 
    width: 1050px; 
    margin: 0 auto 0 auto; 
    padding-top:7px; 
    color:#008080; 
    font-size:30px; 
} 
.specilites img{ 

    background-repeat: no-repeat; 
    background-size: cover; 
    overflow:hidden; 
    -webkit-border-radius:50px; 
    -moz-border-radius:50px; 
    border-radius:50px; 
    width:90px; 
    height:90px; 
    display:inline-block; 
    border: 1px solid #008080; 
} 
.specilites h1{ 
    width: 1050px; 
     margin: 0 auto 0 auto; 
     padding-top:7px; 
     color:#008080; 
     font-size:30px; 
    } 
    .specilites td{ 
     font-size:15px; 
    /* display:block;*/ 

    } 
<div class="specilites"> 
    <table> 
     <tr> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td>Accident & Emergency Care</td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
     </tr> 
     <tr> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
     </tr> 
     <tr> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
     </tr> 
     <tr> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
     </tr> 
     <tr> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
      <td><img src="http://lorempixel.com/400/200"/></td> 
     </tr> 

     </table> 
</div> 
+0

嗨上面的文字顯示像我的輸出 – 2015-04-01 07:26:04

+0

@ HSP護理:你想要什麼到底是什麼?你的輸出應該如何? – kiran 2015-04-01 07:28:16

+0

@ hsp care:您現在可以轉換文本的​​,您希望在任何需要的圖像之後顯示文字。 – kiran 2015-04-01 07:59:32

相關問題