safari中的bootstrap文本框高度问题

时间:2016-08-01 08:28:00

标签: css twitter-bootstrap

我是bootstrap的新手。我准备了一个屏幕,除了Safari之外,所有浏览器都能正常工作。

在safari中,因为文本框高度所有设计中断。请看图片。

It should be in one row

这是我的代码:

  <div id="drugSection" class="panel panel-default">
            <div class="row">
                <div class="col-md-12">
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Doses")
                            @Html.DropDownList("Doses", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Type")
                            @Html.DropDownList("Type", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Route")
                            @Html.DropDownList("Route", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Frequency")
                            @Html.DropDownList("Frequency", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4 ">
                        <div class="form-group">
                            @Html.Label("Days")
                            @Html.TextBox("Days", "", new { @class = "form-control custom-height", @placeholder = "Days" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Package Details")
                            @Html.DropDownList("Package Details", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>

                    <div class="col-md-4 col-sm-4 ">
                        <div class="form-group">
                            @Html.Label("Quantity")
                            @Html.TextBox("Quantity", "0", new { @class = "form-control custom-height", @placeholder = "Quantity" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Unit")
                            @Html.DropDownList("Unit", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            @Html.Label("Refill")
                            @Html.DropDownList("Refill", new SelectList(listItems), new { @class = "form-control" })
                        </div>
                    </div>
                </div>
            </div> 
             <div class="row nomargin">
                    <div class="col-md-8 noPl">
                        <div class="col-md-4 col-sm-4 ">
                            <div class="form-group">
                                @*<div class="col-md-offset-2 col-md-10">*@
                                <div class="checkbox-inline">
                                    @Html.CheckBox("PRN")
                                    @Html.Label("PRN")
                                </div>
                                @* </div> *@
                            </div>
                        </div>
                        <div class="col-md-4 col-sm-4 mbot10-xs">
                            <div class="form-group">
                                <div class="checkbox-inline">
                                    @Html.CheckBox("DAW/DNS")
                                    @Html.Label("DAW/DNS")
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-12 col-md-8 noPl">
                        @Html.TextBox("rx lbl", "", new { @class = "form-control", @style = "max-width:100%;margin-bottom:13px;", @placeholder = "Additional Sig (will appear on rx label)" })

                    </div>
                </div>

            </div>

如何在safari中修复它。任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:0)

每个文本框和选择框都给出相同的高度。 例如,

public class FirstTestCase { 
  public static void main(String[] args) throws InterruptedException {  
   System.setProperty("webdriver.chrome.driver", "path/to/downloaded chromedriver"); 
   WebDriver driver = new ChromeDriver(); 
   String URL = "https://www.google.com";
   driver.get(URL);
  }
}

这只是一个例子。您可以将高度更改为您想要的任何高度。