1. When setting the background color and background image for the element, the background color will overwrite the background image when it is written behind the background.
such as Background:url ();
background-color:red;
2. When the demand paragraph right aligns, and the last line left to Playhead
(1) Use text-align-last:right; But this property is not fully supported by the browser
(2) set to the following structure, and set the appropriate style
<div class= "Parent" >
<p class= "Child" > A paragraph of text </p>
</div>
<style>
. parent{
width:100px;
Text-align:right;
background:red;
word-break:break-all;//here is to make a long word wrap.
}
. child{
Display:inline-block;
width:80px;
Text-align:left;
}
</style>
When the div is set to right, the P element is aligned to the right, but internally or left aligned
3. In order to prevent the site link to be used directly after the copy, generally after the verification of the URL for certain operations, using history.pushstate (); You can modify the URL without refreshing.
Window.history.pushState (null, Document.title, AppUrl)//appurl is the modified URL
4. Many tags have the title attribute, that is, the mouse hover can appear title content.
5.ES6 's new APIReflect.ownKeys(obj);可以返回对象的所有key,包括Symbol()类型的key,返回的是一个数组,在webkit和moz都是支持的,而IE都不支持。开发移动端可以使用。
Finally, I recently prepared to write some small plug-ins, for peacetime use, now only write a hidden plugin on the element display, you can use like Vue or angular, welcome all together to reference (can star best, hey), can also contribute some of their own plug-ins.
GitHub Address: Https://github.com/zzwcjj/plugs
Small knowledge points summarize html, CSS, JavaScript (i)