Add font and color styles ------- CSS and font styles ------- cssControls the font, style, and color of text by using CSS.
1. Basic operations:
1 body{ 2 font-family: Verdana, Geneva, Tahoma, sans-serif 3 } 4 5 body{ 6
draw a contour line around an element, as shown in the following methodBy default, for an element with a border, using the Outline property will draw a contour line against the perimeter of the border, and if we want the contour line to deviate a few pixels outward, the CSS3 new Outline-offset attribute will do the same, it is very simple to use, is to assign it an integer value with a pixel unit, and if it is specified as a positive integer, offset outward if it is specified as a negative inte
Web page font style Chinese blackbody: StheitiWeb page font style Chinese italic: StkaitiWeb page font style xxfareastfont-Arial: StsongWeb page font style Chinese imitation: stfangsongWeb page font style bold: SimheiWeb page font
CSS Font Properties Define text (such as italic) and deform (such as small capital letters)Code collated from w3school:http://www.w3school.com.cn:CSS: Font styles (font family, size, bold, style, warp, etc.)
CSS How to customize the font you know? There are CSS styles to set the font style, such as the introduction of the font size, as well as the font weight settings, this article teaches you how to use CSS style to do these things, now let's take a look at the article
First o
Use CSS To set the font and text style:1. define font type font-familyUsage:Font-family:name;Font-family:ncursive|fantasy|monospace|serif|sans-serifName indicates the font name, and you can specify multiple fonts, separated by spaces. Ranked in order of precedence. If the
CSS Font style propertiesCSS text styles
Serial number
Chinese description
Markup syntax
1
Font style
{font:font-style font-variant font-weight font-size
This chapter will make the text in your Web page more beautiful.
Some properties about the text
font-family: Text font
Font-size: Text Size
Color: Text Colors
Font-weight: Text thickness
Text-decoration: More Styles of text
, Geneva, Sans-serif;
Times New Roman Font, which is the most commonly used serif font, is the default font for the browser. The legibility of small words is also very poor. CSS notation: font-family: ' Times New Roman ', times, serif;
4. CSS font name (five
In a page-responsive design, it is often necessary to display different sizes of fonts based on the screen resolution. It is common practice to specify different font styles for different resolutions through media queries, for example:Body { font-size: 22px;} H1 { font-size:44px;} @media (min-width:768) {
Background
In the process of application development, it is often seen that some information with different font styles is like the time and charging information on the default lockscreen. In a similar situation, the first possible response is to use different textviews. Different font styles are set for each textview
(a) Commonly used font properties: Font-weight: Attribute value 100-900 400 equals normal 700 equals bold, the larger the value, the thickerFont-size: Font size, unit can be PX or%Font-family: Font Family such as: Microsoft Ya BlackFont-style:
value, units: pixels) The parameter represents how many times the default font width is Msp.setspan (new Scalexspan (2.0f), $, Spanned.span_exclusive_exclusi VE); 2.0F is twice times the width of the default font, which is twice times the x-axis of the default font, and the height is constant//sets the Bullet Msp.setspan (new Bulletspan ( Android.text.style.bull
Android TextView font color and other styles
For Android, you can set multiple color fonts for each TextView text.
Code used by SpannableString in TextView
// Create a SpannableString object SpannableString msp = new SpannableString (font test font size half twice foreground color background color normal bold italic u
Common CSS font attributes (more text hidden, or displayed in the form of ellipsis), background styles, and two uncommon attributes of the background image: background-origin and background-clip,
(1) Common font attributes:
Font-weight: attribute value 100-900 400 equals normal 700 equals bold. The larger the val
IOS developed to get all font styles
Ios provides many font styles. Sometimes we may use different fonts when developing applications. Through this Demo, We can get all the font styles for us to choose.First, get the
Look at this picture below, the red circle is Java ugly font rendering, yellow is the normal windows rendering, Green is the Mac-style rendering.In fact, I feel normal style is very good, is to see that Java Swing menu, very uncomfortable.This Java Desktop program, font style is not unified. Actually, I also want to know how this is done?Use Eclipse all year round. Installing NetBeans once and encountering
Background informationIn the development application process, you often encounter information that displays a number of different font styles like the default lockscreen time and charge information. For a similar scenario, the first reaction might be to use a different number of TextView for each textview to set a different font style to meet the requirements. Th
Font stylefont-family Setting the font nameFont-size setting the size of a fontFont-style Setting font style Normal default value. The browser displays a standard font style. The Italic browser displays an italic font style. Oblique The browser will display a italic
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.