Call the externally defined CSS file_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:18:04
Original
1220 people have browsed it

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>
Copy after login


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>
Copy after login


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>
Copy after login

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!


css file confirmation Is this necessary?


css file confirmation Is this necessary?


No need, write the code directly in the css file

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template