Home > Web Front-end > HTML Tutorial > How does jsp reference a css file_html/css_WEB-ITnose

How does jsp reference a css file_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:09:18
Original
1180 people have browsed it

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts -tags"%>



< ;title>Show









sytle.css is in the css directory, which is at the same level as the jsp file
sytle.css The content of the file is as follows:
.Btn1
{ height:50px; width:120px; font-size:14px; font-size:26px; background-color:#F00 "
}

.Btn2{ height:50px; width:120px; font-size:14px; font-size:26px; background-color:#FCC "}

Just can’t see the effect. Don't know why.
How should I write the sytle.css file if I program the clss ID?
What’s wrong with my usage above?


Reply to discussion (solution)

One is sytle.css and the other is style.css..

jsp references css and html Same
Did you write the file name correctly (one L, one 1)
If you still can’t get it out, there may be a problem with the file encoding.
There may be a problem with the encoding of your css file.
I use vs2008 to write aspx files.
My design colleagues use Dreamweaver to write .css and sometimes encounter the problem that the overall style cannot be displayed.
What is the solution?
Just save the file code in the same format when saving the file


Make sure the css file path name is correct

#FCC "} This What is it?


Make sure the path is correct

Press the path There should be no problem according to the poster's description. The problem should be with the "" at the end of the symbol in the style mentioned above. This is redundant. Delete it and take a look.

The path should be fine according to the poster's description. The problem should be the "" at the end of the symbol in the style mentioned above. Delete this redundant one and see

Thank you. I wrote the style directly in the jsp at the beginning and then copied it. , I forgot to delete the "" at the end. It works now.

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