我用过<br>
在 html 表单样式中提供垂直空间的标签。这在 Firefox 中工作正常,但不会改变谷歌浏览器中的 spcaing。请让我知道错误。
头部部分
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
我的表单的一部分是:
<div id="filter-details">
<form action="" method="post">
From Date-Time:<br />
<input type="text" id="startdate" name="startdate" value="">
<br />
To Date-Time:<br />
<input type="text" id="enddate" name="enddate" value="">
<br />
CSS 样式表:
br {
margin-bottom: 5.7px;
}
最佳答案
为谷歌浏览器添加如下css代码,设置content:"";
br{
display: block;
margin: 5.7px 0;
content: " ";
}
br{
display: block;
margin: 5.7px 0;
content: " ";
}
<div id="filter-details">
<form action="" method="post">
From Date-Time:<br />
<input type="text" id="startdate" name="startdate" value="">
<br />
To Date-Time:<br />
<input type="text" id="enddate" name="enddate" value="">
<br />
关于html - <br> 标签对 chrome 没有影响,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39741170/