Add a nice button to the home page (top)

Source: Internet
Author: User
Button

is not in the Web page, for the production of buttons to worry ah? Use the picture to do the button, influence speed, do not use the picture, the webpage comes with the button really is does not feel the compliment, really recently more vexed, actually, has the CSS (cascading style sheet abbreviation, the cascading style list), on some questions may welcome the toughness and the solution.

$#@60;! -Example 1. Yellow background button --$#@62;
$#@60;form method= "POST"$#@62;
$#@60;p$#@62;
$#@60;input type= "button" value= "Buttons" name= "A1" style= "Background-color:rgb (255,255,0)"$#@62;

$#@60;/p$#@62;

$#@60;/form$#@62;

Slightly understand the HTML original code and CSS friends can see, the above code is the HTML of the common button in a style form (style), with Background-color to state the background color properties of the button, followed by RGB (255,255,0) gave its attribute value , it becomes the yellow button that we see.

$#@60;! -Example 2. Yellow background, 9pt red italics button --$#@62;

$#@60;form method= "POST"$#@62;

$#@60;p$#@62;$#@60;input type= "button" value= "Buttons" name= "A1"

Style= "Background-color:rgb (255,255,0); Color:rgb (255,0,0); Font-family: italics _gb2312; Font-size:9pt "$#@62;

$#@60;/p$#@62;

$#@60;/form$#@62;

The example above is a step on the basis of example 1, adding three attributes, one is color, his value is RGB (255,0,0), is the color of the font is red. Another is font-family, which indicates that the character of the font is in italics, and that his value is in italics _gb2312. The last font-size refers to the font size of the property is 9pt.

Through the above two examples, we have basically mastered the use of CSS to make the buttons on your Web page more beautiful. Below, I will teach you the actual, make more complex, more beautiful buttons.



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.