• <table id="4yyaw"><kbd id="4yyaw"></kbd></table>
  • <td id="4yyaw"></td>
  • 發布時間:2020-09-28 23:23 原文鏈接: 一篇文章帶你了解CSS3圓角知識(一)


    一、瀏覽器支持

    表中的數字指定完全支持該屬性的第一個瀏覽器版本。

    數字后面的 -webkit- 或者 -moz- 使用時需要指定前綴。

    屬性ChromeFirefoxSafariOperaIEborder-radius5.0 4.0 -webkit-9.04.0 3.0 -moz-5.0 3.1 -webkit-10.5

    二、border-radius 屬性

    1.  創建具有背景圖的圓角

    CSS3中,可以使用border-radius屬性,為元素指定圓角顯示。

    代碼如下:

    <!DOCTYPE html>    <html>    <meta charset="UTF-8">    <title>項目</title>
       <head>        <style>            #rcorners1 {                border-radius: 25px;                background: #f00;                padding: 20px;                width: 200px;                height: 150px;            }
               #rcorners2 {                border-radius: 25px;                border: 2px solid #73AD21;                padding: 20px;                width: 200px;                height: 150px;            }
               #rcorners3 {                border-radius: 25px;                background: url(img/fy_indexBg.jpg);                background-position: left top;                background-repeat: repeat;                padding: 20px;                width: 200px;                height: 150px;            }</style>    </head>
       <body>
           <p>The border-radius property allows you to add rounded corners to elements.</p>        <p>Rounded corners for an element with a specified background color:</p>        <!--1.具有指定背景色的圓角元素-->        <p id="rcorners1">Rounded corners!</p>        <p>Rounded corners for an element with a border:</p>        <!--2.帶邊框的圓角元素:-->        <p id="rcorners2">Rounded corners!</p>        <!--3.帶背景圖的圓角元素-->        <p>Rounded corners for an element with a background image:</p>        <p id="rcorners3">Rounded corners!</p>
       </body>
    </html>


  • <table id="4yyaw"><kbd id="4yyaw"></kbd></table>
  • <td id="4yyaw"></td>
  • 调性视频