且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何淡出div,然后在相同位置淡入另一个div。仅CSS

更新时间:2023-01-08 19:37:36

对两个DIV使用 position:absolute ,以使它们都位于同一位置。 (并且将父DIV的 position:相对用作位置定位符)

Use position: absolute for the two DIVs to allow them to be both at the same position. (and position: relative for the parent DIV to make it serve as the position anchor)