Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML背景图像链接_Html_Css_Image - Fatal编程技术网

HTML背景图像链接

HTML背景图像链接,html,css,image,Html,Css,Image,有人能帮我做这个吗 我想要的是一个带有背景图像的链接,位于表中的一行中 谢谢你的帮助 谢谢任何元素都可以有背景图像: <a href='link' style='background-image:url("/images/link.png");'>link</a> 任何元素都可以有背景图像: <a href='link' style='background-image:url("/images/link.png");'>link</a> 如果您

有人能帮我做这个吗

我想要的是一个带有背景图像的链接,位于表中的一行中

谢谢你的帮助
谢谢

任何元素都可以有背景图像:

<a href='link' style='background-image:url("/images/link.png");'>link</a>

任何元素都可以有背景图像:

<a href='link' style='background-image:url("/images/link.png");'>link</a>

如果您提供链接或
标记样式
display:block
,并为其提供特定的宽度和高度,它应该可以正常工作

a.classname {
    display:block;
    height:16px;
    width:16px;
    background: url(images/myImage.png);
}

如果您提供链接或标记样式
display:block
,并为其指定特定的宽度和高度,则该样式应该可以正常工作

a.classname {
    display:block;
    height:16px;
    width:16px;
    background: url(images/myImage.png);
}


你的意思是这样的吗

<html>
<head>
<style type="text/css">
    a  
    {
        background-image:url('http://www.google.com/logos/2011/mary_blair-2011-hp.jpg');
    }
    table, td, th
    {
        border:1px solid black;
    }
</style>
</head>
<body>
<table>
    <tr>
        <td>
            <a  href=”www.google.com”> Google</a>
        </td>
        <td>
            Google
        </td>
    </tr>
</table>
</body>
</html>

A.
{
背景图像:url('http://www.google.com/logos/2011/mary_blair-2011-hp.jpg');
}
表,td,th
{
边框:1px纯黑;
}
谷歌

你的意思是这样的吗

<html>
<head>
<style type="text/css">
    a  
    {
        background-image:url('http://www.google.com/logos/2011/mary_blair-2011-hp.jpg');
    }
    table, td, th
    {
        border:1px solid black;
    }
</style>
</head>
<body>
<table>
    <tr>
        <td>
            <a  href=”www.google.com”> Google</a>
        </td>
        <td>
            Google
        </td>
    </tr>
</table>
</body>
</html>

A.
{
背景图像:url('http://www.google.com/logos/2011/mary_blair-2011-hp.jpg');
}
表,td,th
{
边框:1px纯黑;
}
谷歌

欢迎使用堆栈溢出!是否允许使用JavaScript?“在表中的一行中”。啊。。我能看见我前面的桌子。(请显示相关HTML)欢迎使用堆栈溢出!是否允许使用JavaScript?“在表中的一行中”。啊。。我能看见我前面的桌子。(请显示相关的HTML)