内联 div 背景未显示
我正在尝试使用两个 div,其中一个在左角具有不重复的背景,用作“弯曲边框”图像,第二个 div 在该 div 中,其背景由第一个 div 的宽度偏移div 的图像,使其看起来像是一个实体图像,随着页面宽度流畅地拉伸。我尝试按照我描述的方式执行此操作,但它不起作用,只显示拉伸的重复背景 div。我更愿意从头开始尝试你们中的一个建议。
I'm trying to use two divs, one with a non repeating background in the left corner to serve as a 'curved border' image, and the second div, within that one, with a background that is offset by the width of the first div's image so that it seems to be one solid image, that fluidly stretches with the page width. I tried doing this the way I described but it isn't working, only the stretched repeating background div shows up. I would prefer to try from scratch something one of you suggests.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在左侧 div 上设置显式宽度,并尝试在两个 div 上使用 float:left (以确保它们正确对齐)。
并设置 border:none (我可能在这里说的是显而易见的)。
Try setting an explicit widh on the left div, and try using float:left on both (to make sure they align properly).
And set border:none (I'm stating the obvious here, probably).