Use CSS & amp; jQuery to create a colorful clock.

Source: Internet
Author: User

Use CSS & jQuery to create a colorful clock.

You may have seen a variety of clock effects, such as a variety of novel animated clocks made by Flash many years ago.WebDevelopers have begun to apply the latest technologies such as CSS3 and Canvas to implement them. The colorful clock effect that we want to share today is not necessarily seen. Let's take a look.

Articles you may be interested in
  • 10 useful results in Web development [Source Code download]
  • Excellent jQuery Ajax paging plug-ins and tutorials carefully selected
  • 12 classic jQuery image carousel plug-ins
  • Let the website get started! 12 excellent jQuery animation plug-ins
  • A well-selected jQuery image effect plug-in

 

Online Demo of source code download

 

Link to this article: Use CSS & jQuery to create a colorful clock

Source: Dream sky ◆ focus on front-end development technology ◆ share web design resources

This article from [dream sky (http://www.cnblogs.com/lhb25 )]


How to Use css

Css can layout html code when html code is available
Deploy one or more specified elements by tag, class, and id.
For example
<Div class = "a" id = "B"> I am a DIV </div>
The tag layout is
Div {/* CSS content */}/*. All the divs in html will have these attributes */
Class Layout
. A {/* CSS content */}/*. In this case, all the elements in html containing class a will have these attributes */
Div. a {/* CSS content */}/* In this case, all the classes in html contain a and all the elements of div will have these attributes */
Id
# B {/* CSS content */}/* Generally, only one id can correspond to one element in the same document */
It can also be written
Div # B {/* CSS content */}/* This element must be a div */
Check the usage
Zhidao.baidu.com/question/234142818.html

If you want to learn
Www.w3school.com.cn/css/index.asp

CSS usage Problems

Share: 20 CSS tips
1. Simplified CSS font attributes

In general, CSS is used to set the font attributes as follows:

Font-weight: bold;
Font-style: italic;
Font-varient: small-caps;
Font-size: 1em;
Line-height: 1.5em;
Font-family: verdana, sans-serif

But you can also write all of them to one line:

Font: bold italic small-caps 1em/1.5em verdana, sans-serif

Really good! Only one note: this shorthand method takes effect only when both the font-size and font-family attributes are specified. Also, if you do not set font-weight, font-style, and font-varient, they will use the default value, which should be noted.

2. Use two classes at the same time

Generally, only one Class can be set for one element, but this does not mean that two classes cannot be used. In fact, you can:

<P class = "text side">... </p>

At the same time, two classes are given to the P element, with an empty lattice in the middle. In this way, the attributes of all the text and side classes will be added to the P element. If the attributes of the two classes conflict, the subsequent settings take effect, that is, the attributes of the classes placed in the CSS file take effect.

3. Default Value of CSS border

You can usually set the border color, width, and style, such:

Border: 3px solid #000

The border is displayed as 3 pixels wide, black, and solid. However, you only need to specify the style here.

If only the style is specified, the default value is used for other attributes. Generally, the default width of Border is medium, which is generally 3 to 4 pixels. The default color is the text color. If this value is correct, you don't need to set that much.

4. CSS for document printing

Many websites have a printing version, but this is not actually required, because you can use CSS to set the printing style.

That is to say, you can specify two CSS files for the page, one for screen display and the other for printing:

<Link type = "text/css" rel = "stylesheet" href = "stylesheet.css" media = "screen"/>

<Link type = "text/css" rel = "stylesheet" href = "printstyle.css" media = "print"/>

1st rows are displayed, and 2nd rows are printed. Pay attention to the media attributes.

But what should I write in printed CSS? You can set it by designing common CSS. At the same time of design, you can set this CSS to display CSS to check its effect. Maybe you will use the "display: none" command to turn off some decorative images and then turn off some navigation buttons. For more information, see "Print differences.

5. Image replacement skills

Generally, we recommend that you use standard HTML to display text instead of images. This is fast and readable. However, if you want to use some special fonts, you can only use images.

For example, if you want to use the entire selling icon, you can use this image:

<H1>

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.