Building maintainable Software-java Write short Units of CodeAny fool can write code that a computer can understand. Good programmers WriteCode that humans can understand.-martin Fowlerguideline:? Limit The length of code units to lines of code.? Do the writing units that is longer than lines ofCode in the first place,
13.4.2.1 using units of measureIn F #, it is easy to use units of measure, which is why we look at this chapter simply for a brief explanation. Claim metering uses the Type keyword, plus proprietary attributes. Strictly speaking, metering is not a type, but we can use it as part of another type. We first define two simple meters, which represent kilometers and hours:[type km[type hIt can be found that the t
One, n more chatterSome of the new units in the CSS3 were introduced in the spring of last year, see: CSS length values and time, frequency, and angle units. Obviously, it mentions the unit VW, VH, which is to be lamented in this article, see:But "I see you" is not the same as "I Touch You". Coincidentally, a coincidence, recently with these two
One, n more chatterSome of the new units in the CSS3 were introduced in the spring of last year, see: CSS length values and time, frequency, and angle units. Obviously, it mentions the unit VW, VH, which is to be lamented in this article, see:But "I see you" is not the same as "I Touch You". Coincidentally, a coincidence, recently with these two
render a Web site perfectly rendered by producing browser-rendered pixels.
One problem with pixel units is that it does not extend for visually impaired readers to accommodate mobile devices.
2, EM
The EM unit name is the relative length unit. Relative to the font size of the text within the current object, such as the font size of the current text within the line is not artificially set, compared to the b
53.33333%.
Obviously, it's inconvenient.
Root-related length units
To fix the problem with the font size definition, you can now use unit REM (root em). REM is also a relative unit, but it corresponds to a fixed base value, the fixed base value of which is the font size of the root element of the document (in the HTML file, the HTML element). Assuming, as in the previous example, the font size of the 10
document sizes are divided into two categories: relative length units and absolute length units. However, relative length units according to different reference elements, but also can be divided into font relative
such element length units are not discussed in this category), what are the specific meanings of these units, where to use, choose which unit in RWD is the most suitable?Then first one to understand their meaning and usage and then make a choice for the specific application. Lattice units (PT)PT is a point (LB) abbrev
Length of Unit The length unit is one of the most commonly used units in web page design. A disorderly, disorganized page is unlikely to leave a good impression on people. As a result, it is necessary to define values precisely for the position and size of the element in order to achieve the desired effect. CSS is one of the main functions of CSS positioning,
In the new contact with CSS, px with more, but also very good understanding, but with a long time will find some defects, especially in the response to develop the time.So when is it that so many units are suitable? Let's talk about it today.First of all, explain the meaning of these units:1, pxPX unit names are pixels and pixels are fixed-sized units for screen
length as the number of pixels.For example, the interface has a length of "80dp" picture, then it is actually displayed as 80x1.5=120px on the 240dpi mobile phone, on the 320dpi phone actually displayed as 80x2=160px.If you compare these two phones together, you will find the physical size of the picture "almost", which is the effect of using DP as unitPx:That is, the pixel, 1px represents a physical pixel
CSS
The length of a unit
The unit of length is one of the most commonly used units in web page design. A disorderly, disorganized page is unlikely to leave a good impression on people. As a result, it is necessary to define values precisely for the position and size of the element in order to achieve the desired effect.
css gives people the ability to accurate
becomes 255,-23 conversion to 0. percentages and integers are converted by a percentage multiplied by 255 and converted to the nearest integer.Hexadecimal: This is the conversion of an RGB integer, which is not the same as an integer. Convert everyone to the corresponding hexadecimal number on the line.Web-Safe color: 256-color display the specific color that the system takes to prevent color jitter. Percentages are: 0%, or multiples of 20%, integers are 0, or multiples of 51. Hexadecimal is: T
The CSS syntax contains the following sections:
Selector: Lets you select the element that you want to add a style to.
Property: The property name of the style, for example, color, which represents colors.
Values and units: the value and unit of the property.
Syntax rules: Some fixed syntax for CSS.
Note: The user's description of the CSS program is not performed.
Basic syntax rules for CSS
Case is ignored (but i
Quoted here is Jorux's "95% Chinese web site needs to rewrite CSS" article, the topic is a bit scary, but it is the current domestic web page production of some shortcomings. I have always been confused about the relationship between PX and EM and the characteristics, and have seen a great harvest. Usually use PX to define the font, so the browser can not enlarge the font function, and most of the foreign sites are available under IE. Because: 1. IE cannot adjust the font size using PX as the u
Android on the common measurement unit [xdpi, hdpi, mdpi, ldpi] interpretation from: http://www.cnblogs.com/cmduan/archive/2012/03/09/2388345.html
Explanation of common measurement units (xdpi, hdpi, mdpi, and ldpi) on Android
Terms and conceptsScreen SizeThe physical size of the screen, based on the diagonal length of the screen (such as 2.8, 3.5 ).In short, Android simplifies all screen sizes into three
I believe every Android novice will encounter this problem, I hope this post can let you no longer tangled.Px:That is, the pixel, 1px represents a physical pixel on the screen;PX units are not recommended, as the same 100px picture, the actual size displayed on different phones may be different as shown (images from Android Developer Guide, same as below).The occasional use of PX is when you need to draw a 1-pixel table line or a hatched line, with ot
Px:That is, the pixel, 1px represents a physical pixel on the screen;PX units are not recommended, as the same 100px picture, the actual size displayed on different phones may be different as shown (images from Android Developer Guide, same as below).The occasional use of PX is when you need to draw a 1-pixel table line or a hatched line, with other units such as DP will appear blurred.Dp:This is the most c
, the user interface may be too small to see the content.Resolution-independent units of measure can solve this problem. Android supports all of the following units.Other units: (infrequently used)pt(LB) point, is a standard length unit, 1pt=1/72 inch, for the printing industry, very simple to use; in Android, 1pt is roughly equal to 2.22SP in inches (inches): un
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.