我想我的输入字段是它所在容器宽度的98%。问题是,当我将其设置为98%宽度时,输入消失。有没有特别的方法来定义输入的宽度或什么?输入宽度百分比不正确
这里是我的HTML:
<div class="large-12 columns centered">
<input class="typeahead" type="text" placeholder="Start typing to search" spellcheck="false" autofocus />
</div>
这里是我的CSS:
input {
padding: 0.8rem 0.9rem;
height: inherit;
font-size: 1.25rem;
margin: 0 0 .5rem 0;
display: block;
width: 98%;
}
但由于某些原因,这就是结果:
没关系,还有被认为是造成问题的外部CSS文件,它已得到解决现在。 – user3306747