gpt4 book ai didi

html - 使用位置 : fixed 时 div 缩小

转载 作者:太空宇宙 更新时间:2023-11-04 11:25:52 27 4
gpt4 key购买 nike

我有一个 <div>我想让它成为position: fixed .我添加了 CSS 规则 position:fixed但在添加 <div> 之后缩小。

enter image description here

enter image description here

请指导我。

我的html代码是这样的

<div layout="row" style="background-color:#1CA5EA; position:fixed">

<div offset="25" flex="30" class="input-container">
<md-input-container flex >
<label style="color:white">Search</label>
<input ng-model="search" style="border-bottom:2px solid white;color:white;">
</md-input-container>
</div>

<div flex="10" class="input-container">
<button class="primary-button md-button md-default-theme">
<span class="ng-scope" ui-sref="company.addRecruitmentProject">
+ JOB AD
</span>
</button>
</div>

</div>

最佳答案

对那个 div 使用 width:100%;

<div layout="row" style="background-color:#1CA5EA; position:fixed; width:100%;">

<div offset="25" flex="30" class="input-container">
<md-input-container flex >
<label style="color:white">Search</label>
<input ng-model="search" style="border-bottom:2px solid white;color:white;">
</md-input-container>
</div>

<div flex="10" class="input-container">
<button class="primary-button md-button md-default-theme">
<span class="ng-scope" ui-sref="company.addRecruitmentProject">
+ JOB AD
</span>
</button>
</div>

</div>

Demo here

关于html - 使用位置 : fixed 时 div 缩小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32390842/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com