1. <tfoot id='8emDo'></tfoot>
    2. <small id='8emDo'></small><noframes id='8emDo'>

      <i id='8emDo'><tr id='8emDo'><dt id='8emDo'><q id='8emDo'><span id='8emDo'><b id='8emDo'><form id='8emDo'><ins id='8emDo'></ins><ul id='8emDo'></ul><sub id='8emDo'></sub></form><legend id='8emDo'></legend><bdo id='8emDo'><pre id='8emDo'><center id='8emDo'></center></pre></bdo></b><th id='8emDo'></th></span></q></dt></tr></i><div id='8emDo'><tfoot id='8emDo'></tfoot><dl id='8emDo'><fieldset id='8emDo'></fieldset></dl></div>

    3. <legend id='8emDo'><style id='8emDo'><dir id='8emDo'><q id='8emDo'></q></dir></style></legend>
      • <bdo id='8emDo'></bdo><ul id='8emDo'></ul>

      创建圆形 div 比使用图像更简单的方法?

      时间:2023-09-07
      <i id='Dvilc'><tr id='Dvilc'><dt id='Dvilc'><q id='Dvilc'><span id='Dvilc'><b id='Dvilc'><form id='Dvilc'><ins id='Dvilc'></ins><ul id='Dvilc'></ul><sub id='Dvilc'></sub></form><legend id='Dvilc'></legend><bdo id='Dvilc'><pre id='Dvilc'><center id='Dvilc'></center></pre></bdo></b><th id='Dvilc'></th></span></q></dt></tr></i><div id='Dvilc'><tfoot id='Dvilc'></tfoot><dl id='Dvilc'><fieldset id='Dvilc'></fieldset></dl></div>
        <bdo id='Dvilc'></bdo><ul id='Dvilc'></ul>

            <tbody id='Dvilc'></tbody>
          <tfoot id='Dvilc'></tfoot>

            <small id='Dvilc'></small><noframes id='Dvilc'>

            <legend id='Dvilc'><style id='Dvilc'><dir id='Dvilc'><q id='Dvilc'></q></dir></style></legend>
              1. 本文介绍了创建圆形 div 比使用图像更简单的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我想知道是否有比我现在做的更简单的方法来创建圆形 div.

                I'm wondering if there's an easier way to create circular divs than what I'm doing now.

                目前,我只是为每种不同尺寸制作一张图片,但这样做很烦人.

                Currently, I am just making an image for each different size, but it's annoying to do this.

                有没有使用 CSS 来制作圆形的 div 并且我可以指定半径?

                Is there anyway using CSS to make divs which are circular and I can specify the radius?

                推荐答案

                这是一个演示:http:///jsfiddle.net/thirtydot/JJytE/1170/

                CSS:

                .circleBase {
                    border-radius: 50%;
                    behavior: url(PIE.htc); /* remove if you don't care about IE8 */
                }
                
                .type1 {
                    width: 100px;
                    height: 100px;
                    background: yellow;
                    border: 3px solid red;
                }
                .type2 {
                    width: 50px;
                    height: 50px;
                    background: #ccc;
                    border: 3px solid #000;
                }
                .type3 {
                    width: 500px;
                    height: 500px;
                    background: aqua;
                    border: 30px solid blue;
                }
                

                HTML:

                <div class="circleBase type1"></div>
                
                <div class="circleBase type2"></div><div class="circleBase type2"></div>
                
                <div class="circleBase type3"></div>
                

                要在 IE8 及更早的版本中使用此功能,您必须下载并使用 CSS3 PIE.我上面的演示无法在 IE8 中运行,但这只是因为 jsFiddle 不托管 PIE.htc.

                To make this work in IE8 and older, you must download and use CSS3 PIE. My demo above won't work in IE8, but that's only because jsFiddle doesn't host PIE.htc.

                我的演示如下所示:

                这篇关于创建圆形 div 比使用图像更简单的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何在html页面中画圆圈? 下一篇:返回两个圆之间的 x,y 交点的 JavaScript 函数?

                相关文章

                最新文章

                    • <bdo id='M2KYq'></bdo><ul id='M2KYq'></ul>

                    <i id='M2KYq'><tr id='M2KYq'><dt id='M2KYq'><q id='M2KYq'><span id='M2KYq'><b id='M2KYq'><form id='M2KYq'><ins id='M2KYq'></ins><ul id='M2KYq'></ul><sub id='M2KYq'></sub></form><legend id='M2KYq'></legend><bdo id='M2KYq'><pre id='M2KYq'><center id='M2KYq'></center></pre></bdo></b><th id='M2KYq'></th></span></q></dt></tr></i><div id='M2KYq'><tfoot id='M2KYq'></tfoot><dl id='M2KYq'><fieldset id='M2KYq'></fieldset></dl></div>

                    <small id='M2KYq'></small><noframes id='M2KYq'>

                  1. <tfoot id='M2KYq'></tfoot>

                    <legend id='M2KYq'><style id='M2KYq'><dir id='M2KYq'><q id='M2KYq'></q></dir></style></legend>