First: The difference between the Px,em,rem.
PX is an absolute font sizeEM is the relative font size calculated based on the cardinality (for example: 1.5em). This cardinality is multiplied by the current object from its parent to the genetic font
1 Block-level elements and inline elements
1 Block-level elements
Occupy a row and cannot be tied to any other elements
Can accept wide, high
If you do not set the width, the width defaults to 100% of the father.
2 in-line elements
Alongside other
A few days ago interview met to write a tab bar switch function, thought basically understand, but haven't written for a long time, to realize the effect is really a bit difficult. Back, then the idea of a reason, write a, the basis is still very
1. Force text line display:
White-space:nowrap;
Multiline text last ellipsis:
Display:-webkit-box; -webkit-line-clamp:2; Overflow:hidden; -webkit-box-orient:vertical; Text-overflow:ellipsis;
2. Set overflow text to appear as an ellipsis tag:
Effect Preview
Source code Download
Https://github.com/comehope/front-end-daily-challenges
Code interpretation
Defines the DOM, which contains 1 .car elements, and its 2 child elements represent the body and the wheel:
This article gives you the content is about how CSS to achieve the transparency and opacity of the image (complete code), there is a certain reference value, the need for friends can refer to, I hope to help you.
1. Image transparency opaque to
This article brings you the content is about how to use pure CSS to achieve a smile meditation small monk, there is a certain reference value, the need for friends can refer to, I hope to help you.
Effect preview:
Code interpretation:
Defines the
When we browse the major websites, we can click on the images to enlarge, rotate, and so on. This effect can really make a person's eyes bright, also may bring the user clicks the traffic. Of course, powerful CSS features are more than just such
This article brings you the content is about Webpack use command line to install the steps, there is a certain reference value, the need for friends can refer to, I hope to help you.
Weback Command-line installation
The first step:
NPM Install
CSS page layout is very useful in Web pages, CSS page layout can control the relative normal layout flow, peripheral elements, parent container, or the location of the main viewport/window, so what is the CSS layout method? Let's take a look at how
This article introduces you to the content of the CSS in the layout of the use of the summary (with code), there is a certain reference value, the need for a friend can refer to, I hope you have some help
1. Basic usage
There are 5 core properties
It is generally used in the following situations:
Test001.jsp
title 001
When two styles are used, separate them with spaces.
Test002.jsp
title 001
-----------------------------------------------------------------
1. textarea length and width settings
Method 1: Use Cols and rows
Disadvantage: it cannot be modified after setting (JS cannot be modified), and the size of IE and Firefox is different.
Method 2: Use width and height.
2. Automatic
Because IE6 does not support the CSS first-Child pseudo class, we try to solve the problem through the CSS expression. Of course, the CSS expression cannot be executed in Firefox, so basically both are written, and write them together.
The
This kind of requirement often occurs. When a user registers an account, it checks whether the user input is legal. The simplest one is to check whether the two passwords are the same. If it is too troublesome to call background detection, the
Start --> Web tracking has been released
(Web Inspector)
Inspector; Supervisor
Then select the icon in the lower left corner. The code page and screen are displayed separately.
After separation, you will see the magnifier icon on the code
1. Simple selection operatorType Selector Based on HTML tags and class or ID Selector Based on HTML attributesExample:A: select the type of the HTML Tag (Save the name of the <> HTML Tag)P {...}, body {...}, input {...}
B: class or ID Selector Based
1. Intra-row
Use style attribute in HTML TagCode:
......
Because you need to set the style attribute for each tag, the post-maintenance cost is very high, and it is easy to appear bloated, not recommended.
2. embedded
Write CSS between and
For JavaScript and CSS files on websites, we often compress them to save server bandwidth and speed up website page rendering (File Download is faster, and web pages are certainly faster ). For websites that use a lot of JavaScript, JavaScript files
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