使用CSS,如何定位图像以便在调整窗口大小时图像不会移动
我想知道是否有人可以帮助我使用 css。我一直坚持使用后台附件:已修复;
它似乎不起作用。我基本上试图将图像作为链接,但我不希望它滚动,所以我将其制作为背景图像。 我有......
<a href="/contents/selection" title= "Manage selection." id="f-logo" style="background-image:url({{STATIC_URL}}images/flowsTab_normal.png);background-attachment:fixed;background-repeat:no-repeat;display:block; height: 90px;width: 130px;"> </a>
当我取出背景附件:固定时,我看到图像,但是一旦我把它放进去,它就消失了。我故意在锚标记之间省略了文本,因此图像就像一个可点击的链接:D
ive 被超级卡住了。非常感谢您的帮助。谢谢! css语法很混乱...
i was wondering if anyone could help me with css. ive been stuck on using background-attachment:fixed;
it just doesn't seem to work. im basically trying to make an image a link, but i don't want it to scroll so i made it into a bg image.
i have...
<a href="/contents/selection" title= "Manage selection." id="f-logo" style="background-image:url({{STATIC_URL}}images/flowsTab_normal.png);background-attachment:fixed;background-repeat:no-repeat;display:block; height: 90px;width: 130px;"> </a>
when i take out background-attachment:fixed, i see the image, but once i put it in, it disappears. i deliberately left out text between the anchor tags so the image is like a clickable link : D
ive been super stuck. help would be much appreciated. thanks! css syntax is confusing...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需将一个字符添加到您的锚标记即可。不间断的空格就可以解决问题。
请参阅我关于非常有用的工具 jsfiddle.net 的示例。
Simply add a character to your anchor tag. A non breaking space will do the trick.
See my example on the very useful tool, jsfiddle.net.