Most of the time, in the layout of the need for uniform style, and can not be modified each, so the use of CSS unified style.
Write a common style that requires the dongdong to be called together. If you need to modify the style, you only need to modify the common style.
Here are a few of the steps to create and reference a CSS style:
1. Now create a new folder under the WebContent directory of the project, named style (this random).
Indicates that we have CSS style files in this folder.
2. Right-click within the style folder you just created-new-other choose Create CSS file and name it. I'm named Mystyle.css here.
3. Customize a style in this CSS style file.
. pp {size:24em; color:red;}
I define this as the style that you want to be.
4. Citation notes
References are divided into two parts
One is referenced in a JSP file, the other is referenced in an HTML file, and two is a little bit different.
Reference in the JSP file:
Referencing in an HTML file:
By contrast, you can see the difference in ${pagecontext.request.contextpath} on the path of the project.
5, start the reference (JSP, HTML These two are the same)
<form name= "MyForm" action= "/webtest001/myservlet" method= "POST" > <p class= "pp" > This is a CSS exercise </p> <i Nput class= "pp" type= "button" value= "Send" onclick= "Send ();" ></form>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/5E/wKiom1YbVp3zoS8ZAACszaI8QNc294.jpg "title=" 0151012144241.png "alt=" Wkiom1ybvp3zos8zaacszai8qnc294.jpg "/>
This article is from the "climb over the mountains to see the Sea" blog, please be sure to keep this source http://670176656.blog.51cto.com/4500575/1702103
A reference to CSS styles