1. Ununderline web hyperlinks

<style> a {text-docoration:none} a:hover {color: #3366CC; text-decoration:underline} </style>Copy the code

2. Set the floating background

<style type="text/css">
    body { background-image:url(image/bg.gif); background-attachment:fixed}
</style>
Copy the code

3. Align text correctly

<style>
    .dq { margin-left: 68px; margin-right: 70px; margin-top:69px; margin-bottom: 71px}
</style>
Copy the code

4. Problems with hover style after hyperlink visit

To prevent problems with the hover style after a hyperlink is visited, type it at the appropriate location in the head

    a:link {
        color:red
    }
    a:hover {
        color:blue
    }
    a:visited {
        color:green
    }
    a:active{
        color:orange
    }
</style>
Copy the code

5. Solve the problem that list-style-image cannot be accurately located

You can enter it at the corresponding location in the head

< style type = "text/CSS" > li {list - style: url (" http://gluu5.163.com//E/11/ 6. GIF "); } li a { position:relative; top:-5px; The font: 12 px / 25 px song typeface; } </style>Copy the code

The general solution is to use Li’s background simulation, here using the method of relative positioning can also be solved.

6. Center the text vertically

<style type="text/css">
    Div {
        height:50px;
        line-height:50px;
    }
</style>
Copy the code

7.border-width

Example 1

border-width:thin medium thick 10px;
Copy the code

The top border is thin the right border is medium the bottom border is thick the left border is 10px wide example 2

Copy the code

Example 3

border-width:thin medium;
Copy the code

The top and bottom borders are thin and the right and left borders are medium example 4

border-width:thin;
Copy the code

All four borders are thin

8. Use CSS to remove the underline

<style>
    a { text-decoration: none}
</style>
Copy the code

9. Set the color of the scroll bar

<style type="text/css">
    html {
        scrollbar-face-color:#f6f6f6;
        scrollbar-highlight-color:#fff000;
        scrollbar-shadow-color:#ee00ee;
        scrollbar-3dlight-color:#ee222e;
        scrollbar-arrow-color:#ccc000;
        scrollbar-track-color:#ddeecc;
        scrollbar-darkshadow-color:#fffddd;
    }
</style>
Copy the code

I formed a front-end learning exchange group to learn front-end technology. Share learning materials for everyone, match learning partners for everyone, organize everyone to carry out project practice regularly. Those who want to join the group can click the link to join the group chat [Web front-end Technology Group] : front-end learning exchange