【发布时间】:2021-01-22 09:05:19
【问题描述】:
嗨, 我希望读到这篇文章的人身体健康,精神饱满。我在定位 div 时遇到了一些困难。我希望突出显示的 div 的建议框位于水平滚动的顶部。 我正在研究 React Js。我在这里添加我的代码。我真的很感谢你的帮助。谢谢
<td>
<div
style={{
width: "125px",
marginTop: "0px",
marginLeft: "5px",
marginRight: "5px",
}}
>
<div style={{position:"relative"}}>
<div
id={"myAutocompleteParentDiv" + this.props.id}
style={{
width="100%";
position="relative"
}}
>
<input class="provider-form" autocomplete="off" id="myAutocompleteID" type="text" name="searchValue" placeholder="" value="" style="margin-left: 0px;">
<span style="position: relative; right: 35px; top: 5px;">
<i class="my-autocomplete-search-icon"></i>
</span>
<div id="myAutocomplete-list-cptCode0" class="myAutocomplete-items" style="max-height: 190px; overflow-y: scroll; background-color: white; width: 125px;">
<div title="searchValue" id="undefined">
<strong>822</strong>32<input type="hidden" value="82232">
</div></div>
</div>
</div>
</div>
</td>
【问题讨论】:
标签: html css reactjs responsive-design css-position