HTML部分
<html><head> <title>编写外部CSS文件</title> <link rel="stylesheet" type="text/css" href="3.css"></head><body> <h3 align="center">编写外部CSS文件</h3> <hr/> <p>在html文件应用链入外部样式表方法调用外部css。</p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/ai/2347">
<img src="https://img.php.cn/upload/ai_manual/001/246/273/176023920531705.png" alt="华文笔杆">
</a>
<div class="aritcle_card_info">
<a href="/ai/2347">华文笔杆</a>
<p>写材料用华文,华文笔杆帮你搞定公文写作</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="华文笔杆">
<span>491</span>
</div>
</div>
<a href="/ai/2347" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="华文笔杆">
</a>
</div>
</body></html><style type="text/css"><!-- h3 {font-family:黑体;font-size:25px;color:black} p {background:orange;font-family:隶书;font-size:25px;color:blue}--></style> 浏览器都不一样,很难解释...慢慢调吧...
<style type="text/css"><!--//这个注释的意思就是支持的浏览器就显示,不支持的就略过. h3 {font-family:黑体;font-size:25px;color:black} p {background:orange;font-family:隶书;font-size:25px;color:blue}--></style>现在浏览器的问题很头大,得一上问题一个问题的找,遇到这问题就头大!
css文件确认需要这样吗?
css文件确认需要这样吗?
不需要,css文件直接写代码
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号