我有一个内容完整的页面,窗口是可滚动的,其中有可滚动的div,其中我的目标是在div的最底部放置一个图标,当有人滚动div时它将可见,并且在内容后不可见消失或窗口滚动.
但我没有得到如何实现我的目标.使其固定它可以看到全身滚动.
我想要将该元素固定在div的底部,如果正文滚动则不会显示
下面我举个例子:
div { height: 100px;
border: 1px solid;
overflow:auto;
position:relative;
}
span {
background : red;
position : fixed;
}
I have something
I have something shdbfs jsdfjhs d sdfhsjdgf dsb usbsd shdshdhsdbs ds dvhsd sdshd vcsgdvshuc sd chjsdcsshdcbshudcuysdchusd cuyssdc shd cscyusdc gsdcsducsgcs uycsucs sdusdyu
I have something shdbfs jsdfjhs d sdfhsjdgf dsb usbsd shdshdhsdbs ds dvhsd sdshd vcsgdvshuc sd chjsdcsshdcbshudcuysdchusd cuyssdc shd cscyusdc gsdcsducsgcs uycsucs sdusdyu
this need to fixed at the botti=om and visible while scrolling the div
I have something
I have something shdbfs jsdfjhs d sdfhsjdgf dsb usbsd shdshdhsdbs ds dvhsd sdshd vcsgdvshuc sd chjsdcsshdcbshudcuysdchusd cuyssdc shd cscyusdc gsdcsducsgcs uycsucs sdusdyu
I have something shdbfs jsdfjhs d sdfhsjdgf dsb usbsd shdshdhsdbs ds dvhsd sdshd vcsgdvshuc sd chjsdcsshdcbshudcuysdchusd cuyssdc shd cscyusdc gsdcsducsgcs uycsucs sdusdyu
I have something
I have something shdbfs jsdfjhs d sdfhsjdgf dsb usbsd shdshdhsdbs ds dvhsd sdshd vcsgdvshuc sd chjsdcsshdcbshudcuysdchusd cuyssdc shd cscyusdc gsdcsducsgcs uycsucs sdusdyu
I have something shdbfs jsdfjhs d sdfhsjdgf dsb usbsd shdshdhsdbs ds dvhsd sdshd vcsgdvshuc sd chjsdcsshdcbshudcuysdchusd cuyssdc shd cscyusdc gsdcsducsgcs uycsucs sdusdyu
正如您所看到的那样,如果我将红色条带内容定位为固定,则红色条带内容对整个身体是可见的.但是,我只想将它固定在div的底部,只有在div滚动时才可见.