<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                學習了CSS布局的定位和浮動,我們可以簡單地做出很多排版和內容拼接。今天就來做幾個簡單的實例展示現在流行的DIV+CSS布局的方便好用之處。順便也說一下CSS3新增的樣式屬性box-shadow和屬性transform。 ### 一,圖文混排 ~~~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS布局之圖文混排</title> <style type="text/css"> #test { border:#FF00FF solid 2px; width:650px; height:460px; background-color:#CCCCCC; margin:auto; } #img { padding-top:3px; float:left; } img { width:300px; height:350px; } #text { color:#0000FF; font-size:18px; font-family:"微軟雅黑"; } </style> </head> <body> <div id="test"> <div id="img"> <img src="6.jpg" /> </div> <div id="text"> 高圓圓,中國女演員,1979年10月5日出生于北京市豐臺區云崗一個普通的知識分子家庭。1996年高圓圓被廣告公司發掘,隨后拍攝了大量廣告,成為了廣告圈中的模特。1997年高圓圓出演了她的第一部電影《愛情麻辣燙》,從此開始了她的演員生涯。2001年高圓圓參演的電影《十七歲的單車》獲得柏林國際電影節最佳影片銀熊獎。2003年高圓圓首次嘗試古裝武俠劇,在《倚天屠龍記》電視劇中飾演峨眉派掌門周芷若。2005年主演的電影《青紅》獲得戛納國際電影節評審團大獎,同年成為荷蘭國際球根花卉中心中國首屆百合小姐。2008年到2009年,拍攝電影《南京!南京!》,該片獲圣塞斯蒂安國際電影節最佳電影金貝殼獎。2011年憑借電影《單身男女》獲得香港電影金像獎最佳女主角提名。2012年主演陳凱歌導演的影片《搜索》。2013年高圓圓主演的視劇《咱們結婚吧》在央視、湖南衛視黃金檔播出。2014年主演的愛情電影《一生一世》票房突破兩億。電影《君子道》已定檔期2015年國慶檔。 </div> </div> </body> </html> ~~~ 效果圖: ![](https://box.kancloud.cn/2016-04-28_5721559bbe8b3.jpg) ### 二,圖像簽名 ~~~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS布局之圖像簽名</title> <style type="text/css"> #test { border:#FF00FF solid 2px; width:720px; position:absolute;/*讓文字不會脫離圖片*/ top:50px; } img { width:720px; height:480px; } #text { color:#0000FF; font-size:24px; font-family:"華文隸書"; position:absolute; bottom:50px; right:50px; } </style> </head> <body> <div id="test"> <div id="img"> <img src="10.jpg" /> </div> <div id="text"> 國民女神————高圓圓 </div> </div> </body> </html> ~~~ 效果圖: ![](https://box.kancloud.cn/2016-04-28_5721559bedd5a.jpg) ### 三,多圖拼接 ~~~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS布局之圖片拼接</title> <style type="text/css"> #box { margin:auto; height:600px; width:690px; } .test { height:300px; width:690px; } .img { height:300px; width:230px; float:left; } img { height:300px; width:230px; } </style> </head> <body> <div id="box"> <div class="test"> <div class="img"><img src="16.jpg" /></div> <div class="img"><img src="17.jpg" /></div> <div class="img"><img src="18.jpg" /></div> </div> <div class="test"> <div class="img"><img src="19.jpg" /></div> <div class="img"><img src="20.jpg" /></div> <div class="img"><img src="21.jpg" /></div> </div> </div> </body> </html> ~~~ 效果圖: ![](https://box.kancloud.cn/2016-04-28_5721559c13adb.jpg) ### 四,圖片特效 我們在做這個實例之前先來簡單的介紹CSS3新增的樣式屬性:box-shadow(邊框陰影)和transform(旋轉特效)。在學習CSS的時候學到了很多的盒子模型的樣式屬性,加以結合也會做出很好的效果。詳細的看一看:[CSS3box-](http://www.w3school.com.cn/cssref/pr_box-shadow.asp)[shadow屬性](http://www.w3school.com.cn/cssref/pr_box-shadow.asp)和[CSS3transform屬性]()。 (1)邊框陰影屬性:box-shadow 設置元素的陰影,其實沒有邊框也可以添加陰影效果 語法規則: box-shadow:apx bpx cpx #xxxxxx; box-shadow:apx bpx cpx rgb(0,0,0,0.1); apx表示水平方向的移動;bpx表示豎直方向的移動;cpx表示陰影的模糊距離;最后面的為顏色值。 (2)旋轉特效屬性:transform 設置元素的旋轉,向元素應用2D或3D轉換。該屬性允許我們對元素進行旋轉、縮放、移動或傾斜。 transform:rotate(angle單位為deg); 定義2D旋轉在參數中規定角度,angle表示角度。 ~~~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS布局之圖片特效</title> <style type="text/css"> body { margin:30px; background-color:#CCCCCC; } div.polaroid { width:294px; padding:10px; margin:10px; border:1px solid #BFBFBF; background-color:#FFFFFF; box-shadow:10px 10px 10px #999999;/*圖片陰影的設置*/ } div.rotate_left { float:left; transform:rotate(8deg);/*圖片向右傾倒*/ } div.rotate_right { float:left; transform:rotate(-8deg);/*圖片向左傾倒*/ } </style> </head> <body> <div class="polaroid rotate_left"> <img src="http://www.w3school.com.cn//i/ballade_dream.jpg" alt="郁金香" width="284" height="213" /> <p class="caption">上海鮮花港的郁金香,花名:Ballade Dream。</p> </div> <div class="polaroid rotate_right"> <img src="http://www.w3school.com.cn//i/china_pavilion.jpg" alt="世博中國館" width="284" height="213" /> <p class="caption">2010年上海世博會,中國館。</p> </div> </body> </html> ~~~ 效果圖: ![](https://box.kancloud.cn/2016-04-28_5721559c318bd.jpg)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看