css| News | Web page
Mouse transform
Do you want to do this on the home page? When you move the mouse over the words "site help," the shape becomes help, and when you move to a hyperlink that may take a long time to wait, the mouse shape becomes a wait. If you don't believe me, just copy the following code into a text editor, save it as a Web page file, and then I'll explain what the code means.
<title>cursor</title>
<body>
<p style=cursor:hand> Hand Shape </p>
<p style=cursor:move> Mobile Logo </p>
<p style=cursor:wait> Waiting Status </p>
<p style=cursor:crosshair> Positioning Indication </p>
<p style=cursor:help> seek help </p>
</body>
This code is very simple, use only the "cursor" attribute in CSS, use the "Style=cursor: value" such as the form of a statement to set its value on it. For example, when the value is "hand", when the mouse is moved to the corresponding text or picture, becomes the hand of the hyperlink; When the value is move, when the mouse moves to the corresponding text or picture, it becomes the shape of the left and right arrow, the other shape of the mouse, and the "cursor" value.
Shadow effect
This shaded text, which is not an inserted graphic, is written with a "cascading style sheet--css" with several lines of code, which can be more space-saving than inserting a picture. The source code for this page is this:
<title>shadow</title>
<style type=text/css>
<!--
p {position:absolute;
top:130;
left:50;
Filter:dropshadow (color=pink,offx=4,offy=4,positive=1);}
-->
</style>
<body>
<p style=font-size:48;font-weight:bold;color:red;> Shadow effect </p>
</body>
This effect is used in the CSS filter in the "DropShadow" attribute, the code is: {Filter:dropshadow (color=pink,offx=4,offy=4,positive=1)}, where, "Color" The parameters represent the color of the shadow, and "OFFX" and "offy" represent the offset of the shadow in the X and Y directions. The positive argument can take a value of "0" or "1" and a value of "0" to set the shadow for transparent pixels, or "1" to set the shadow for an opaque pixel.
When using the "DropShadow" attribute, it is important to note that the value of the "position" property must be "absolute", otherwise the shadow cannot determine the direction of the offset. The code that adds a shadow to a graphic is exactly the same as the code that sets the shadow for the text.