<div class="wrap">
<div class="header"></div>
<div class="main"></div>
</div>
When header
is set to position:fixed
, how do I make its width equal to the width of the parent element wrap
?
is there any pure css
implementation?
= =
explanation of the answer adopted:
Source: influence of transform on elements
transform
downgrade fixed
to absolute
, so the width is adaptive, so
so fixed
element width adaptation can only be handled with js
?