Learning CSS - Part 15 - appeared Links

Using How CSS can display links on the page set Let. Such that the use of JavaScript in the page is much less . Through the use of color can style links, the font size of their following Line links, each link background color and many other properties change links We .

Being able to link all of the properties in CSS is It is better to use the Style Section HEAD of your text or file External CSS to the page are links to use. Either process Same work. We here in the style HEAD defined text We .

Links to work with the CSS can make a link to the profile into four sections below we can see them :

a: link and a
These characteristics show how the links on the page are still not click on them to adjust .
a: hover
This characteristic of the link status when they put the cursor on the sets .
a: active
This section defines the status of a link that will click on it .
a: visited
This attribute for links that used in previous visits have been used .

To work with our links section Top of text features HEAD Use. The code below in Section HEAD will enter text. Also Can the Style external use has been previously described

Code :


<style type="text/css">
<-
a: link {attributes}
a: hover {attributes}
a: active {attributes}
a: visited {attributes}
->
</ Style>

Top features for each can define its own profile, for example Can color characteristics bachkground-color to set background color when the link The mouse is placed on its use or to determine the color Text Color Links. Generally get more features for text that performance Links are also in use for example font-family and font-size and border and ...

Here we considered an example where the green links page Are shown with font size 12 pt and no underlined when mouse They placed their colors are red and they find a different background color As well as a box around them comes into existence. When clicking on the color Link to White and click links in previous times have been underlined They are displayed. To build links with the properties that were expressed, we can This code section HEAD text or to use external style :

Code :


<style type="text/css">
<-
a: link {color: green; font-size: 12pt; text-decoration: none}
a: hover {color: red; background-color: # 6699CC; border: # 006699 2px solid}
a: active {color: white}
a: visited {text-decoration: underline}
->
</ Style>

Because we can only link a specific part of the page to the desired shape is ID to use

Code :


# Pre a: link, # pre a {color: green; font-size: 10pt; text-decoration: none}
# Pre a: hover {color: red; background-color: # 6699CC; border: # 006699 2px solid; text-decoration: none}
# Pre a: active {color: White}
# Pre a: visited {text-decoration: underline; color: # 003399}

In this code we ID've used. Now for the links For example, a Div on the page should be this way ID for the desired Div their We define

Code :


<div align="center" id="pre">
Codes Links
</ Div>





One response to "Learning CSS - Part 15 - appeared Links"

  1. GOOD Excellent

Write Reply