This article mainly introduces the method of setting CSS text font color (CSS color). Friends who need it can refer to it
1. Understanding CSS color (CSS color)
What we want to introduce here is what the web page color settings include; web page color regulations.
1. Commonly used colors include: font color, hyperlink color, web page background color, border color
2. Color specifications and color regulations: Web pages use RGB mode colors
2. Basic knowledge of color
The use of color in web pages is an essential element of web pages. The purpose of using color is to be distinctive, dynamic (especially used in hyperlinks), and beautiful. At the same time, color is also one of the style expression elements of various web pages. Learn about CSS font colors.
Comparison between traditional html color and css color under w3c standard and p CSS application color
CSS color color syntax:
color:#000000;
## In the #Css style, add the RGB color value (#FFFFFF, #000000, #F00) directly after the color.The RGB color value is determined during the actual layout and can be obtained using the Photoshop (PS for short) picking tool.
3. Two methods to set the object color style
1. Use the color color style in the p tagwww.jb51.net
2. Use the color color style CSS code in the CSS selector: .pcss5{color:#00F}/* Set the text in the object pcss5 to be blue*/Extended reading: Here we use CSS comments to set up this style, understand CSS comments3, p CSS color style is complete Case: Css code:
Copy code
The code is as follows:.pcss5{color:#00F} /* 设置对象pcss5内文字为蓝色 */HTML code:
Copy code
The code is as follows:<p> 标签内使用color css样式 <p style="color:#F00">www.jb51.net 红色</p> </p> <p>外部样式表设置对象color颜色 <p class="pcss5">www.jb51.net 蓝色</p> </p>4. Instance structure diagram:
The above uses the color color style within the tag and the color color style in the css code.
4. The text color control is the same
If the text color of traditional html and css is the same, use "color:" "RGB color value", if the color is black text That is, just add "color:#000;" to the corresponding CSS attribute selector.5. Differences in web page background color settings
Traditionally set the background color using "bgcolor=color value", while in CSS, "background:" color value is used. For example: set the background to black, traditional Html setting, that is, add "bgcolor="#000"" in the tag to achieve a black background color. If it is in W3C, it will always be "background:#000" in the corresponding CSS selector. accomplish.6. Difference in setting border color
Traditional "bordercolor=value", "border-color:" color value in CSS. For example: In traditional HTML, just add "bordercolor="#000"" directly to the table tag. In current CSS, set "border-color:#000;" to make the border color black. Remember to set the width and Style (dashed, implemented). p Extended knowledge of CSS color values:A color value is a keyword or a number in the RGB specification.
7. RGB color gives one of four methods
1. #rrggbb (for example, #00cc00) (it is strongly recommended to use this to represent color values)2, #RGB (eg, #0c0)
3, RGB(十中,x,x) x is an inclusive integer between 0 and 255 (eg, RGB(0,204,0 ))
4, RGB (Y%, Y%, Y%), where y is an inclusive quantity between 0.0 and 100.0 (such as RGB (0%, 80%, 0%))
8. The following is the RGB color table
Of course, general web development software has color value pickers:
CSS color picker in web development software DW software
How to obtain CSS color value?
We can't remember the color value, and how to determine the exact same color value as the artwork? In fact, it is very simple. Usually we obtain the accurate color value through the color recognizer tool in the PS software. Of course, we can also use other specialized color recognition tools to obtain the accurate color value.
9. p css color color style summary
Use css style to set the color color style of object content. We can use named CSS class objects to set its color style, and set it directly in the html tag. color style. Above, we also introduced and practiced these two methods of setting color for text content in detail.
HTML5 Video/Audio plays local files
The above is the detailed content of CSS text font color setting method (CSS color). For more information, please follow other related articles on the PHP Chinese website!

在css中,可用list-style-type属性来去掉ul的圆点标记,语法为“ul{list-style-type:none}”;list-style-type属性可设置列表项标记的类型,当值为“none”可不定义标记,也可去除已有标记。

区别是:css是层叠样式表单,是将样式信息与网页内容分离的一种标记语言,主要用来设计网页的样式,还可以对网页各元素进行格式化;xml是可扩展标记语言,是一种数据存储语言,用于使用简单的标记描述数据,将文档分成许多部件并对这些部件加以标识。

在css中,可以利用cursor属性实现鼠标隐藏效果,该属性用于定义鼠标指针放在一个元素边界范围内时所用的光标形状,当属性值设置为none时,就可以实现鼠标隐藏效果,语法为“元素{cursor:none}”。

转换方法:1、给英文元素添加“text-transform: uppercase;”样式,可将所有的英文字母都变成大写;2、给英文元素添加“text-transform:capitalize;”样式,可将英文文本中每个单词的首字母变为大写。

在css中,rtl是“right-to-left”的缩写,是从右往左的意思,指的是内联内容从右往左依次排布,是direction属性的一个属性值;该属性规定了文本的方向和书写方向,语法为“元素{direction:rtl}”。

在css中,可以利用“font-style”属性设置i元素不是斜体样式,该属性用于指定文本的字体样式,当属性值设置为“normal”时,会显示元素的标准字体样式,语法为“i元素{font-style:normal}”。

在css3中,可以用“transform-origin”属性设置rotate的旋转中心点,该属性可更改转换元素的位置,第一个参数设置x轴的旋转位置,第二个参数设置y轴旋转位置,语法为“transform-origin:x轴位置 y轴位置”。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version
