IE6實現圖片或背景的圓角效果

來源:互聯網
上載者:User

使用ie-css3.htc實現背景圓角效果

<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style>.box {    background-image: url(Demo.jpg);    height: 165px;    width: 220px;    -moz-border-radius: 15px; /* Firefox */    -webkit-border-radius: 15px; /* Safari Chrome */    border-radius: 15px; /* Opera 10.5+,  Internet Explorer 6+  IE-CSS3 */    -moz-box-shadow: 10px 10px 12px #000; /* Firefox */    -webkit-box-shadow: 10px 10px 12px #000; /* Safari 和 Chrome */    box-shadow: 3px 3px 10px #000; /* Opera 10.5+, IE6+ IE-CSS3 */    behavior: url(ie-css3.htc); /* 對IE-CSS3的引用 */}</style></head><body><div class="box"></div></body></html>

ie-css3.htc下載連結:http://pan.baidu.com/s/1gdknU3x

查看ie-css3詳細資料:http://www.evernote.com/shard/s329/sh/9b193dc6-3bb7-4320-9736-b09c764c1735/72c350c1a668af63172fb53fe1f73457

上面這種對於<img>標籤不能達到效果。

使用DD_roundies實現圓角

 

<!DOCTYPE HTML><html><head><script src="DD_roundies.js"></script></head><body><div class="test" style="background-image:url(2.jpg);width:88px;height:106px;"></div><img src="2.jpg" alt="" class="test"/><script type="text/javascript">        DD_roundies.addRule('.test', '10px 10px', true);</script></body></html>

DD_roundies:

  DD_roundies.js:http://pan.baidu.com/s/1o68wluE

  DD_roundies.min.js:http://pan.baidu.com/s/1jGqTwI6

查看DD_roundies詳細資料:http://www.evernote.com/shard/s329/sh/a4a78b4f-4551-41a5-88b8-4e0af5adc6b5/5d0f63706de13e6862447f3d936e17df

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.