admin管理员组文章数量:1415484
I want to create a modal in circle shape instead of the regular rectangle with rounded corners. So it should look something like just a round with the modal-body
in middle, no modal-header
and no modal-footer
.
This is with modal to make sure how it works, instead of regular html circle.
I just want it to look like this.
I want to create a modal in circle shape instead of the regular rectangle with rounded corners. So it should look something like just a round with the modal-body
in middle, no modal-header
and no modal-footer
.
This is with modal to make sure how it works, instead of regular html circle.
I just want it to look like this.
Share Improve this question edited Jun 9, 2016 at 12:01 Sibidharan asked Jun 9, 2016 at 11:49 SibidharanSibidharan 2,7562 gold badges30 silver badges54 bronze badges 5- border-radius: 100% with equal width and height should do it – danimal Commented Jun 9, 2016 at 11:53
- 1 Possible duplicate of How to draw circle in html page? – jmattheis Commented Jun 9, 2016 at 11:54
- @jmattheis No it is about modals! Not circle in html page – Sibidharan Commented Jun 9, 2016 at 11:55
- @danimal can u show an example with modals? – Sibidharan Commented Jun 9, 2016 at 11:55
- 2 @Sibidharan a model is just a html tag (with content) which you can style – jmattheis Commented Jun 9, 2016 at 11:57
2 Answers
Reset to default 5You'll need to experiment with the location of the content within the modal, but here's a working example I've just made using border-radius
: https://jsfiddle/2ahhsa4a/1/
.modal-content {
border-radius: 50%;
width: 600px;
height: 600px;
border: 15px solid #000;
}
You'll notice I've used fixed width
/ height
for the modal, this is to ensure it is a perfect circle when bined with border-radius
for this example.
HTML
<div class="modal-body rounded">
<p>Some text in the modal.</p>
</div>
CSS
.rounded {border-radius: 100%; width: 500px; height: 500px;}
本文标签: javascriptMake modal in circle shapeStack Overflow
版权声明:本文标题:javascript - Make modal in circle shape - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745233068a2648912.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论