Home  >  Article  >  Web Front-end  >  Call the externally defined CSS file_html/css_WEB-ITnose

Call the externally defined CSS file_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:18:041215browse

This post was last edited by fbmgua on 2013-01-02 23:03:17

HTML part
<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></body></html>


3.css code
<style type="text/css"><!--	h3 {font-family:黑体;font-size:25px;color:black}	p {background:orange;font-family:隶书;font-size:25px;color:blue}--></style>


Question: Why do all the attributes of h3 in CSS files not work?

The problem has been found. It is a browser problem. Aoyou does not support it, but both IE and 360 support it. What is the specific reason here? ?

Reply to discussion (solution)

Browsers are different, it’s hard to explain...Take it slow...

<style type="text/css"><!--//这个注释的意思就是支持的浏览器就显示,不支持的就略过.    h3 {font-family:黑体;font-size:25px;color:black}    p {background:orange;font-family:隶书;font-size:25px;color:blue}--></style>

Nowadays, browsers have a lot of problems. You have to look for one problem after another. When you encounter this problem, you have a big problem!

080b747a20f9163200dd0a7d304ba388
c196ae0128ce933a13147e31d2ec0cdf
531ac245ce3e4fe3d50054a55f265927
css file confirmation Is this necessary?

080b747a20f9163200dd0a7d304ba388
c196ae0128ce933a13147e31d2ec0cdf
531ac245ce3e4fe3d50054a55f265927
css file confirmation Is this necessary?


No need, write the code directly in the css file

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn