Some animation effects and code segments collected

Source: Internet
Author: User

We usually collect good animations or special effects and study them as soon as we have time. If yes, update...

1. CSS3 Tencent QQ Logo:

Http://download.alloyteam.com/demo/css3-tencent-qq-logo-advanced/

 

Code segment:

1. Date Format

Use ToString () to format the datetime. now date display.

For example:

DateTime. Now. ToString ("yyyy-MM-dd ")

The result is:

2013-01-22

It can also be formatted to milliseconds.

String s = DataTime. Now. ToString ("yyyy-MM-dd HH: mm: ss: fff ");

2. One line of code, the browser changes to the temporary Editor

This is a tip shared by Jose in CoderWall: enter a line of code in the address bar of the browser: data: text/html,

Data: text/html,

Note: contenteditable is an attribute of HTML5. Therefore, this tip can only be used by browsers that support this attribute.

On this basis, some netizens customized their own Editors:

A) background color, center, large font:

Data: text/html,

B) full screen, large font

Data: text/html, <textarea style = "font-size: 1.5em; width: 100%; height: 100%; border: none; outline: none" autofocus/>

C) center, large font

Data: text/html, <body contenteditable style = "font-size: 2rem; line-height: 1.4; max-width: 60rem; margin: 0 auto; padding: 4rem; ">

D) add the title, center, and font

Data: text/html, <title> Text Editor </title> <body contenteditable style = "font-size: 2rem; line-height: 1.4; max-width: 60rem; margin: 0 auto; padding: 4rem; ">

E) full screen, UTF-8 format, small font

Data: text/html; charset = UTF-8,

F) center, plus title, UTF-8 format, large font (personal favorite)

Data: text/html; charset = UTF-8, <title> TextEditor </title> <body contenteditable style = "font-size: 2rem; line-height: 1.4; max-width: 60rem; margin: 0 auto; padding: 4rem; "spellcheck =" false ">

G) center, with title, UTF-8 format, large font

Data: text/html; charset = UTF-8, <title> TextEditor </title> <body contenteditable style = "font-size: 2rem; font-family: monaco; line-height: 1.4; max-width: 60rem; margin: 0 auto; padding: 4rem; "spellcheck =" false ">

H) full screen, instead of an editor, directly outputs the content in the body

Data: text/html, body {font-family: helvetica; font-size: 15px; line-height: 22px; color: #666; width: 600px; margin: 40px auto; background: # FFF; border: 1px solid # DADADA; padding: 50px ;}

I) full screen, with icons and small fonts

Data: text/html, <link rel = "shortcut icon" href = "http://g.etfv.co/http://www.sublimetext.com"/>

J) center, add the title, UTF-8 format, black green text, large font, add the code to notepad, change the suffix, and use Chrome to open it.

<! DOCTYPE html>

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.