Some skills in CSS learning

Source: Internet
Author: User
Tags relative root directory

I.: the text in the table will not automatically wrap, how to do?

There are two possible scenarios:

The first, you use CSS to format the text in the form of the English font, so that in the DW table text will not automatically change lines, but this is only the DW in the display effect, in IE can be normal line of change. If you want the editing status of the DW to make text wrap automatically, set the font for the text in the table to the Chinese font (for example, "XXFarEastFont-Arial").

The second, you entered in the form of a series of no space in English or numbers, they are recognized as a complete word ie, so will not automatically wrap, in this case, you can use CSS to break the text, such as:
The following is a reference fragment:
<TD style= "Word-break:break-all" >......</td>


Two.: How can we let the layer float on the flash?

In the Web page to set the SWF file to the background transparent, you can do:

DW, in the SWF file's property panel, point parameters, add parameter wmode, value select transparent, or directly modify the code of the page, add in the code that flags the SWF file attribute:

The following is a reference fragment:

<param name= "wmode" value= "Transparent" >


Note that this effect is only supported by IE.

Three.: Background music can not play continuously because of the page switch, how to let it play continuously?

With the frame implementation, the display height (or width) of one frame is defined as 0, the background music is set, and the page switching within the frame does not affect the playback of the entire background music.

Example:

The following is a reference fragment:
<title> frames Page </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<frameset rows= "0,*" frameborder= "NO" border= "0" framespacing= "0" >
<frame name= "Topframe" scrolling= "NO" noresize src= "bgsound.htm" >
<frame name= "MainFrame" src= "main.htm" >
</frameset>
<noframes>
<body bgcolor= "#FFFFFF" text= "#000000" >
Sorry, your browser does not support the display of frames.
</body>
</noframes>

Four.: Change IE font size settings, the page font does not change, how to achieve?

Define page fonts with CSS, for example:

The following is a reference fragment:
<style type= "Text/css" >
<!--
Body {color: #333333; font-family: "XXFarEastFont-Arial"; font-size:9pt}
TD {color: #333333; font-family: "Song", "Arial"; font-size:9pt}
-->
</style>


Basically, the default font of body and TD is set, which is equivalent to defining most of the text content in the page.

Note that when you use CSS to define a default font, do not use such a label, which will mask the default settings for CSS.

Five.: Absolute address and relative address, absolute positioning and relative positioning?

Absolute address: such as http://www.66css.com/default.htm or file://d:/homepage/default.htm address, is the file in the network or the absolute location of the local;

Relative address: Is the link file relative to the current page address, for example, the link and the current page of the same level of the file address as long as the "file name" can be linked to the current page below the subdirectory of the file with "directory Name/file name", linked to the current page in the previous directory of the file /filename ", link sibling but file in another subdirectory" ... /directory name/filename "; The files under the link root (your site's root directory, not the root of your hard disk) can be in the form of"./filename ". Absolute and relatively very easy to understand, the relative is a reference, the absolute is fixed. Why do we advocate using a relative address? Let's say, for example, If you have a index.htm, which refers to some pictures of the images directory, if you use a relative address, the move is only to upload the original set of things to the new space on the line, because the file relative position between each other does not change, so these addresses are still valid. But if you use an absolute address when you insert a picture, the space address changes, and the path to the picture at the point of reference is changed. Of course, sometimes also use the absolute address, such as links to other people's homepage and so on.

The same is true for relative positioning, where the cell moves to where it is positioned relative to a cell The layers are going to be there. In a dialectical perspective, in fact, absolute positioning is also relative, and what we call the difference between the relative positioning is that the level of absolute positioning is relative to the browser's left and upper boundary, and the relative positioning of the layer relative to its carrier (table or another layer) ~ ~

Six.: How do I remove the underline of the link?

Using CSS to achieve:

The following is a reference fragment:
<style type= "Text/css" >
<!--
a:link {Text-decoration:none}
a:visited {Text-decoration:none}
a:hover {Text-decoration:none}
-->
</style>


where a:link represents a generic link style, a:visited represents a linked style that has been visited, and a:hover represents the link style when the mouse passes. Text-decoration:none means no underline, text-decoration:underline indicates an underscore.

If the three link states have the same style, it can be simplified to:

The following is a reference fragment:
<style type= "Text/css" >
<!--
a {Text-decoration:none}
-->
</style>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.