gpt4 book ai didi

html - 填充是链接的一部分

转载 作者:行者123 更新时间:2023-11-28 12:15:22 25 4
gpt4 key购买 nike

我写了 html 代码,但遇到了问题。我添加了图像链接,但该图像有填充。所以现在填充是链接和图像的一部分。我可以做些什么,以便只链接图像吗?

    <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Just testing</title>
<style type=text/css>
.design {background-color: orange; padding: 50px; border: thick double red; margin: 500}
.design2 {background-color: yellow; padding: 10px 100px; border: thick groove red; margin: 10}
.centered {text-align: center}
#blink {text-decoration: underline overline;;color: red}
</style>
</head>
<body style="background-color: lightgray">
<h1 class="centered design2">This is <span style="color:red">MY</span> site :D:D</h1>
<a href="http://upload.wikimedia.org/wikipedia/commons/8/83/Neugierige-Katze.JPG">
<p class="centered"><img class="design" style="align: center" src="Neugierige-Katze.jpg" alt="tolle Katze" width="500" height="325">
</p>
</a>
<p class="centered">Cat the Cat is <span id="blink"> WATCHING YOU</span>
</p>
<p class="centered">
<audio controls>
<source src="Cat_Meow_2-Cat_Stevens-2034822903.mp3" type="audio/mpeg">
<source src="Cat_Meow_2-Cat_Stevens-2034822903.ogg" type="audio/ogg">

</body>
</html>

我很感激任何能帮助我的人。

`

最佳答案

一种方法 http://jsbin.com/OdoSIme/1/

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Just testing</title>
<style type=text/css>
.design {background-color: orange; padding: 50px; border: thick double red; margin: 500}
.design2 {background-color: yellow; padding: 10px 100px; border: thick groove red; margin: 10}
.centered {text-align: center}
#blink {text-decoration: underline overline;color: red}
</style>
</head>
<body style="background-color: lightgray">
<h1 class="centered design2">This is <span style="color:red">MY</span> site :D:D</h1>

<p class="centered design" style="margin:0 auto; display: table;">
<a href="http://upload.wikimedia.org/wikipedia/commons/8/83/Neugierige-Katze.JPG">
<img style="align: center" src="http://wallpapersfor.me/wp-content/uploads/2012/02/cute_cat_praying-1280x800.jpg" alt="tolle Katze" width="500" height="325">
</a>
</p>

<p class="centered">Cat the Cat is <span id="blink"> WATCHING YOU</span></p>
<p class="centered">
<audio controls>
<source src="Cat_Meow_2-Cat_Stevens-2034822903.mp3" type="audio/mpeg"/>
<source src="Cat_Meow_2-Cat_Stevens-2034822903.ogg" type="audio/ogg"/>
</audio>
</body>

关于html - 填充是链接的一部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19215287/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com