【发布时间】:2021-01-13 20:27:55
【问题描述】:
我正在开发一个 angular 8 的应用程序,并且我有一个带有不同按钮的表单。我想知道是否有任何方法可以使 Chrome 和 Firefox 手机显示的按钮响应。这是我现在拥有的:
我的代码:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<div class="row justify-content-around">
<button (click)="register()" class="btn btn-outline-primary col-4"> Submiiiiiiiiit </button>
<button type="submit" class="btn btn-primary col-4"> Validate </button>
</div>
第一个按钮的显示是向下的,但第二个按钮没问题,我猜是文本造成了不同。
谢谢。
【问题讨论】:
-
你尝试设置
button{ width: fit-content}??你有什么CSS? -
我用我的代码添加了一个编辑
-
Your class on 1st button 最后没有关闭,缺少
" -
哦,是的,谢谢你我添加了它,但它不能解决我的问题
-
感谢大家的帮助,我在头部添加了
<meta name="viewport">,现在可以正常使用了。
标签: html css angular twitter-bootstrap