如何使用:Bootstrap,React,MitalueUI的圆圈内上载按钮的设计?
这就是必须的样子:
<div class="container ">
<div class="row mx-auto">
<div class="col ">
<span class="border border-success rounded-circle">
<button class="btnUpload">
<i class="fa fa-upload"></i> Upload
</button>
</span>
</div>
</div>
</div>
This is how It must looks like:
here is the image , circle is a place where phtoto must be uploaded
<div class="container ">
<div class="row mx-auto">
<div class="col ">
<span class="border border-success rounded-circle">
<button class="btnUpload">
<i class="fa fa-upload"></i> Upload
</button>
</span>
</div>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先:与React一起使用时,请使用“ className”而不是“类”。对于您的问题:跨度是一个内联元素,没有边框。通过将显示器设置为阻止或使用DIV元素,将其转变为块元素。然后在其内部垂直和水平的中心按钮,例如使用Flexbox:
https://codesandbox.io of /s/white-http-wsy881
First of all: use "className" instead of "class" when working with react. To your problem: span is an inline element and doesn't have border. Turn it into a block element by setting display to block or use div element instead. Then center button vertically and horizontally inside of it, for example with flexbox:
https://codesandbox.io/s/white-http-wsy881