twitter-bootstrap Bootstrap 输入字段的平方

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24409080/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 21:00:45  来源:igfitidea点击:

Bootstrap input fields squared

cssformstwitter-bootstraptwitter-bootstrap-3

提问by jeffPo

I can't seem to get my corners rounded on any input field on my HTML form. I've tried changing the CSS stylesheet to this:

我似乎无法在 HTML 表单上的任何输入字段上使我的角变圆。我试过将 CSS 样式表更改为:

 * {
  -webkit-border-radius: 4px !important;
     -moz-border-radius: 4px !important;
          border-radius: 4px !important;
  -webkit-border-top: 4px !important;
     -moz-border-top: 4px !important;
          border-top: 4px !important;
  -webkit-border-bottom: 4px !important;
     -moz-border-bottom: 4px !important;
          border-bottom: 4px !important;
}

but that made it so you couldn't see the top and bottom lines. I'm copying the code straight from their site and it's just not formatting right. How can I fix this?

但这使得你看不到顶线和底线。我直接从他们的网站复制代码,只是格式不正确。我怎样才能解决这个问题?

回答by user3599534

Check that you put form-controlclass e.g. class="form-control"in your input fields??? like

检查你是否把form-controlclass="form-control"放在你的输入字段中???喜欢

<input type="text" class="form-control" placeholder="Enter Name">

As I know that was happen when you don't put form-controlclass

据我所知,当你不form-control上课时就会发生这种情况

回答by Katheer Mizal

Use the CSS below:

使用下面的 CSS:

input, input[type="text"]{
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px ;
    border-radius: 4px ;
    border-width: 5px 0px 5px 0px;
    padding: 10px;
}