gpt4 book ai didi

html - Wordpress divi HTML内联图片

转载 作者:太空宇宙 更新时间:2023-11-04 08:51:36 24 4
gpt4 key购买 nike

如何将两张图片并排放置?我必须使用 CSS 还是也可以是 HTML?

        <!DOCTYPE html>
<html>
<style>
a:link { color: #D83F33; background-color: transparent; text-decoration: none; }
a:visited { color: #D83F33; background-color: transparent; text-decoration: none; }
a:hover { color: #D83F33; background-color: transparent; text-decoration: underline; }
a:active { color: #D83F33; background-color: transparent; text-decoration: underline; }
</style>
<div align="center">
<div class=nav1">
<img src="https://reflex-jam.nl/wp-content/uploads/2017/04/Bootcamp-tekst.jpg" alt="E-Sportkleding" />
<p> <a href="https://www.e-sportkleding.nl/html/" target="_blank" style="D83F33">E-sportkleding</a> </p>
<img src="https://www.trias-groep.nl/wp-content/uploads/2014/07/logo_norm.png" alt="Trias" />
<p> <a href="http://www.trias-groep.nl" target="_blank" style="D83F33">Trias jeugdhulp</a> </p>
</div>
</html>
</div>

这是我现在的代码。谁能帮帮我?

最佳答案

请像下面的代码片段一样修改 html/css 以将图片并排放置,将 img 和 p 放在 div 中请参阅下面的代码片段,我在其中编辑了 html 并在 .nav1 中添加了 css 以获得所需的结果。

 a:link { color: #D83F33; background-color: transparent; text-decoration: none; } 
a:visited { color: #D83F33; background-color: transparent; text-decoration: none; }
a:hover { color: #D83F33; background-color: transparent; text-decoration: underline; }
a:active { color: #D83F33; background-color: transparent; text-decoration: underline; }
.nav1{display:inline-block;padding:10px;text-align:center;}
 <!DOCTYPE html>
<html>
<div>
<div class="nav1">
<img src="https://www.trias-groep.nl/wp-content/uploads/2014/07/logo_norm.png" alt="E-Sportkleding" />
<p> <a href="https://www.e-sportkleding.nl/html/" target="_blank" style="D83F33">E-sportkleding</a> </p>
</div>
<div class="nav1">
<img src="https://www.trias-groep.nl/wp-content/uploads/2014/07/logo_norm.png" alt="Trias" />
<p> <a href="http://www.trias-groep.nl" target="_blank" style="D83F33">Trias jeugdhulp</a> </p>

</div>
</div>
</html>

关于html - Wordpress divi HTML内联图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43408380/

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