Js obtains the width and height of hidden elements, and js obtains hidden elements.
There are some js methods on the Internet to obtain the width of hidden elements, but some situations may fail to be obtained.
For example:
Test is obtained, but test2_child is not obtained. In view of this situation, I wrote a solution myself.
Solution:
1. obtain all the hidden
How inline elements and block-level elements convert to each other:Inline elements and block-level elements can be converted to each other, and the conversion method is briefly described below.I. Inline elements are converted to block-level elements:Make the inline element f
1, block-level elements of the characteristics:(1) The contents of block-level elements, or background images, are displayed by default in the upper left corner of the block(2) block-level elements, which, by default, occupy a single line.Commonly used block-level elements: Div, p, H1-h6, HR, ul Li, Ol Li, table, body
JQuery method for obtaining all parent and peer elements and child elements (recommended ).
1. Get the parent Element
$("#id").parent()
Obtain parent-level elements
$("#id").parents()
Obtain all of its ancestor Elements
$("#id").closest()
Obtain the most recent ancestor elements
Android plug-in tool does not depend on Android Studio, although Android Studio is fully integrated with it.
Gradle configurations include the following:
Build variable
The build system can generate multiple APK for the same project according to different configurations. This is useful when you want to build apps of different versions without having to create separate projects for everyone.
DependencyBu
We talked about the ID selector and class selector, and their differences and relationships, and let's explore the magical categories and pseudo-elements.
In fact, I used to pseudo-class and pseudo-elements are also confused, and now decided to peel off its mysterious cloak, first of all, what is pseudo-class? What is a pseudo-element?
Understanding of pseudo-classes and pseudo-
Basic knowledge of jquery1.jquery file Introduction, all the JS code to be written below the code below.src= ".. /jquery-1.11.2.min.js ">script> introduced jquery must be on top of the , but also on other jquery files that are introduced-- 2. Where to write jquery codeLike JS, the jquery code is also written between the type= "Text/javascript">script> jquery Select elements1. Find Elements by IDFirst write a id= "A1">div>(1) Use JS to find, take the s
block Elements :1. Occupy the entire line width
2. There are line breaks before and after
3 A complete box model structure
Inline Elements :
1. Depending on the content to determine the occupancy width
2. No Line break
3. Do not have a complete box model structure
Add:Warning1. An inline element set to Display:block is not allowed to have nested block
The function of the vetical-align is to align the inline elements vertically.Possible values
Baseline
Default. element is placed on the baseline of the parent element.
Sub
Subscript for vertical alignment of the aligned right.
Super
Superscript of vertical aligned aligned
Top
Aligns the top of the element with the top of the highest element in the row
Text-
One. Center horizontallyIn-line elements and block-level elements are different, for inline elements, simply set the text-align=center in the parent element;There are several centering methods for block-level elements:1. Place the element in the table, and then set the table's Margin-left and margin-right to auto, cent
The elements in the CSS row and block-level elements are centered.
I. horizontal center
The element in the row is different from the block-level element. For the element in the row, you only need to set text-align = center in the parent element;
Block-level elements are centered in the following ways:
1. place the elements
CSS3 can be used to show the size of sub-elements in an equal or proportional manner. css3 is used to show the size of sub-elements.
The usage is similar to the Android: layout_weight attribute of android. It is similar to the usage in Android. It is easy to remember that most of the properties are not supported by all browsers currently, therefore, all attributes must be prefixed with "-moz-" and "-webkit-
JQuery drag elements and re-sort them. jquery drag elements to sort them.
This article describes how to drag and sort elements by jQuery. The specific implementation content is as follows:
:
The details are as follows:
We can see the functions we want to implement today. When you drag an image, you can change the existing order of the image and update the order
A deep understanding of pseudo elements and a deep understanding of pseudo elementsDirectory [1] Definition [2] usage first-letter first-line before after selection [3] Highlights [4] DEMO first-word sinking nail effect image superposition effect Definition
Pseudo elements are disguised as elements but not elements, wh
New form elements and properties new Properties Form Property a table cell in HTML5 can be placed outside of the form by adding a form property to the element, such as:
code is as follows
copy code
Username: url:
Click Submit to see the URL:
The code is as follows
Copy Code
? username=oseyebutton= Submit url=http%3a%2f%2fwww.oseye.net
FormActio
software development is actually the data deletion and modification, JavaScript front-end development is no exception. Today I learned the simple use of the jquery framework. Then use it to achieve simple additions and deletions, and then also use the original JavaScript to achieve the same function, in order to see the power of jquery:The code is as follows:Exercises for simple additions and deletions using DOM elements and jquery
(stretching); (Android:gravity property in Android)Box-pack (horizontal alignment of the face container in the parent container): Start (left) | End (right) | Center (center) |Justify (horizontal equal to the parent container width); (Android:gravity property in Android)Box-lines (Specifies if the column exceeds the space in the parent box, whether you want to wrap the line display.) There is currently no browser support for the Box-lines property. ): Single|multiple;Cases:Display:box;Display:-
Block and inline, inline and inline-block, block-level and intra-row elements, intra-row replacement and intra-row non-replacement elements, inlineinline-block
Block: the default display attribute of block-level elements is block. No matter how much content is in the block, the display attribute is always full;
Inline: by default, the display attribute of the r
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.