教你利用iframe在網頁中顯示天氣

來源:互聯網
上載者:User

標籤:des   style   blog   http   color   io   os   ar   sp   

來源:http://www.ido321.com/921.html

css:

   1: *{margin:0;padding:0;list-style-type:none;}
   2: a,img{border:0;}
   3: body{font:12px/180% Arial, Helvetica, sans-serif, "新宋體";}
   4:
   5: /* demo */
   6: .demo{width:800px;margin:0 auto;}
   7: .demo div{margin:40px 0 0 0;}

html:

   1: <div class="demo">
   2:
   3:    <div>
   4:        <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=2&num=5" width="650" height="70" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
   5:    </div>
   6:
   7:    <div>
   8:        <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=7" style="border:solid 1px red" width="225" height="90" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
   9:    </div>
  10:
  11:    <div>
  12:        <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=9" width="800" height="60" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
  13:    </div>
  14:
  15:    <div>
  16:        <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=11" width="500" height="15" frameborder="0"></iframe>
  17:    </div>
  18:
  19:    <div>
  20:        <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=13" width="650" height="221" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
  21:    </div>
  22:
  23:    <div>
  24:        <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=19" width="800" height="120" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
  25:    </div>
  26: /div>

部分效果:

我在項目中做了一個下面的效果

示範地址:http://jsfiddle.net/2yfL8x0g/embedded/result/

下一篇將告訴你怎麼擷取農曆日期:http://www.ido321.com/926.html

教你利用iframe在網頁中顯示天氣

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.