我想要一个带有图像和链接的按钮。这是我的样式代码:
<style>
twitter{
display:block;
background-image: url('CIMA/Social/Twitter.png');
width: 30%;
height: 30%;
}
</style>
和我的 body 密码:
<twitter href="#"> </twitter>
但它不显示任何图像。我尝试了很多不同的图像路径,但它就是不显示...
最佳答案
哦。为什么不
<a href="#"><img src= "cima/social/twitter.png" /> </a>
<style>
a img {width:30%;height:30%;}
</style>
关于html - 图像悬停功能(css)找不到图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22993683/