Review Html+css (4)

Source: Internet
Author: User
Tags color representation

n HTML Color representation

There are three ways to represent colors in a Web page

    • Color words: Blue, green, red, yellow
    • 10 binary representation: RGB (255,0,0), RGB (0,255,0), RGB (0,0,255)
    • 16 binary representation: #ff0000, #00ff00, #0000ff

In nature, all colors can be mixed with three different wavelengths of light. These three kinds of light are red, green, blue light.

In the computer, each base color, with 8-bit binary (2^8=256) ', then RGB can represent 256*256*256=1670 million color.

When color is represented in 16 notation: 2-bit hexadecimal for 1-bit primaries

Color word: Red green Blue

10 binary: RGB (255,0,0) RGB (0,255,0) RGB (0,0,255) RGB (255,255,0)

16 binary: #ff0000 #00ff00 #0000ff

Note: 10 binary compatibility is not good, try to use less. 10 binary color indicates that CSS is used to make transparent display of text.

N Computer-based (learn)

The so-called "into the system" is a kind of "carry system", "every x into one";

The computer can only recognize binary things, binary is the "machine language";

Files on the disk in the computer, data running in memory, are in the form of "binary".

Example: 11101000001010010010

10 binary: There are 10 basic numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, the arithmetic rules "every 10 into 1", such as: 9+1=10

2 binary: There are 2 basic numbers 0, 1, arithmetic rules: every two into one: such as: (101) B (1) 2 = (110) 2

8 binary: There are 8 basic numbers 0, 1, 2, 3, 4, 5, 6, 7, every eight into one: such as: (677) 8+ (1) 8=700 (8)

8 binary can be a good reaction binary, namely: octal and binary conversion between very easy.

Conversion rule: 1-bit 8 binary number, representing 3-bit binary.

Example: (110101100) 2 turn into octal

16 binary: There are 16 basic digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A (10), B, C, D, E, F (15)

Operation rule: every 16 in 1. such as (A2F) 16+1= (A30) 16

It is also because the binary is too long, inconvenient memory, so there are 16 binary.

16 binary and 2 binary, there is also a good relationship between the use of

Conversion rules: 1-bit 16-binary, representing 4-bit 2-binary

Example: (a0f) 16 turn into binary (1010 0000 1111) 2

6

One

TD valign= "Top" > TD valign= "Top" >

10 binary

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

8 binary

0

1

2

3

4

5

6

7

Ten

One

"

+

+

+

+

+

16 binary

0

1

2

3

4

5

7

8

9

A

B

C

D

E

F

Ten

2 binary

0

1

10

11

100

101

110

111

1000

1001

1010

1011

1100

1101

1110

1111

10000

10001

N Anchor Point link

    • Meaning: An anchor link is a jump in a different area of a Web page. Anchor points are understood as "definition tokens".
    • Define anchor points (make a mark): <a name= "anchor name" > </a>

naming rules for u anchor names: You can include letters, underscores, but only start with a letter.

U Note that there is no content between:<a> and </a>, in other words: This mark is not for us to see, but for the link.

U For example: <a name= "TOP2" ></a>

    • Jump to Anchor Point (tick):

U syntax: <a href= "FileName # anchor name" >.........</a>

U file name: optional, if it is a different part of the same page jump, do not need a file name, if you are jumping to different parts of another page, you must have a file name.

U Note: Here the <a> and </a> to have content, otherwise, can not jump.

U For example: <a href= "#top2" > Return top </a>//jump to different parts of the same page

U For example: <a href= "News.html#bottom" > Return bottom </a>//jump to bottom of news.html file

Review Html+css (4)

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.