.archive-header{font-size:12px;background-color:#F7F7F7;padding: 5px 20px;margin-bottom: 1px;overflow:hidden;}.archive-header h1 a{color: #444;float:left;}.archive-header-info{font-size: 12px;color:#999;margin:-4px 0 0;}.archive-header p{float:left;padding: 15px 20px;} <header class="archive-header"> <h1><a href="http://192.168.1.148/?cat=5">2222</a></h1> <p>42342342343</p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/ai/807">
<img src="https://img.php.cn/upload/ai_manual/001/503/042/68b6d8b0f02c6379.png" alt="百度虚拟主播">
</a>
<div class="aritcle_card_info">
<a href="/ai/807">百度虚拟主播</a>
<p>百度智能云平台的一站式、灵活化的虚拟主播直播解决方案</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="百度虚拟主播">
<span>36</span>
</div>
</div>
<a href="/ai/807" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="百度虚拟主播">
</a>
</div>
</header>
.archive-header p{padding: 15px 20px;} 你可以如下控制,这里面牵涉到默认样式重置的问题,h1,p都有自带的margin,另外文字垂直居中可以拿行高来控制
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>p,h1{margin:0;}.archive-header{font-size:12px;background-color:#F7F7F7;padding: 5px 20px;height:22px;line-height:22px;}.archive-header h1 a{color: #444;float:left;}.archive-header p{float:left;}</style></head><body><header class="archive-header"> <h1><a href="http://192.168.1.148/?cat=5">2222</a></h1> <p>42342342343</p></header></body></html> 你可以如下控制,这里面牵涉到默认样式重置的问题,h1,p都有自带的margin,另外文字垂直居中可以拿行高来控制
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>p,h1{margin:0;}.archive-header{font-size:12px;background-color:#F7F7F7;padding: 5px 20px;height:22px;line-height:22px;}.archive-header h1 a{color: #444;float:left;}.archive-header p{float:left;}</style></head><body><header class="archive-header"> <h1><a href="http://192.168.1.148/?cat=5">2222</a></h1> <p>42342342343</p></header></body></html>
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号