我有一个DIV(A),设置了背景图片,A中有另一个DIV(B),B中有图片,位置固定
但当页面大小变化后,A的背景图片相对变化,B中的图片位置就变了
请教大神,怎么让B中的图片随着A的背景一起变化?
因为B中的图片要做一个动画效果。。设置了百分比还是不行,麻烦帮忙看看
<div style="background:url(images/bg.png) top center no-repeat; background-size: cover;width:100%;height:100%;">
<div style="position: relative; top:38%;left:0%;">
<img src="images/bg4.png" width="45%" height="34%">
<div>
<div>