Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我遇到了这个问题,我试图让图像链接出现在按钮旁边,但图像链接跳转到下一行。我想做的是在“添加到袋子”按钮旁边显示一个“尺码指南”图像链接。文本链接不会跳转到下一行,我已经尝试了一个“嘿”文本链接。
“嘿”链接是我希望“尺寸指南”按钮出现的地方。那么我该怎么做呢?
display:block从此规则中删除:
display:block
a img { display: block; text-decoration: none; border: none; }
或创建一个使用display:inline并将其分配给该图像的类。
display:inline