Clip-path can divide the elements of the page by the size of the set to show the area, or the equivalent of a mask instead of actually cutting a part, here we take a look at the CSS in the Clip-path Area clipping property Use tutorial
The Clip-path in
There is a property in CSS called clip, which is intended for trimming and clipping. With its property keyword rect, you can implement the rectangle clipping effect of the element. This property is peacefully in CSS2.1, and there is basically no compatibility issue with browsers such as Max-height/display:table-cell. However, it seems that this property is seldom
CSS Clip:rect Rectangle clipping function and some application introductionby Zhangxinxu from http://www.zhangxinxu.comThis address: http://www.zhangxinxu.com/wordpress/?p=1565One, long story shortCSS has a property called clip , for trimming, clipping meaning. The rect rectangle clipping effect of the element can be a
This time for you to bring CSS control text wrapping and clipping, CSS control text wrapping and cutting attention to what matters, the following is the actual case, together to see.
Some CSS properties about line wrapping, cropping
Word-wrap:normal | Break-word
Normal line wrap, content can burst containers, such as
The clip property is used to set the shape of an element. Used to trim an absolutely positioned element (absolute or fixed).
There are three types of clip values:auto |inherit|rect. Inherit is inherited, IE does not support this property, auto is the default first two basic belongs to soy sauce, we mainly say clip's Rect property.
the Rect property of clip: clip:rect (top,right,bottom,left) Four attribute values are indispensable;
How exactly are these four attribute values calculated? Look at
When the front and back of the integration, often there will be inconsistent path or path error situation, the result is that the CSS is invalid, servlet or JSP page mapping is not.So deliberately write a summary of the path settings:This involves only the path problem of th
Clip-path represents the clipping path, which is the clipping of a piece of content from an object. For example, in the picture, cut some of the areas that need to be left.Here are two concepts: clipping path
1. This is the PHP file. What I want is to replace the css and js files with the files. I have compressed them, added md5, and then added the file path.
1. This is the PHP file. What I want is to replace the css and js files with the files. I have compressed them, added md5, and then added the file path.
Reply cont
1. Just like the php file, the effect I want is that you can replace the Css,js file with the file path that I have compressed, plus MD5, after that.
Reply content:
1. Just like the php file, the effect I want is that you can replace the Css,js file with the file path that I have compressed, plus MD5, after that.
Sometimes you need to have the same page open at the same time on the phone and the PC, one of the ways is to determine the different resolution to load different CSS
The small series summarizes several ways to load CSS separately:1. More complex use JS to judge the load of different CSS (pro-Test available)But this method will only be judged at the very beg
, layout style.(2) The second step is to implement different modules in turn, where I recommend Bem's naming idea, but can nest one to two layers of the selector structure3. Optimized codeI believe that when we complete the basic page effect, there will still be some repetitive or not concise code, this is to optimize the code, mainly in the extraction of duplicate code, as much as possible to streamline the code.About the optimization of CSS code, I
method of summarizingHaving talked so much, here's my summary of some key points in writing CSS code.1, before writing code: from the PSD fileWhen we get the PSD to the designer, first of all, do not rush to write CSS code, the first analysis of the entire page, the main focus is the following:(1) the page is divided into several modules, which modules are common, such as the head and the bottom, there are
pop-up menus
Div + CSS webpage layout tips Example 1: Set the code for centering the entire webpage
Div + CSS webpage layout tips Example 2: Set the vertical center of content in the container
Div + CSS webpage layout tips Example 3: Set the transparency of the layer
Div + CSS webpage layout tips Example 4:
To add a base to a JSP page, you can use a relative path: StringPath=Request.getcontextpath (); StringBasePath=Request.getscheme ()+ "://" +Request.getservername ()+ ":" +Request.getserverport ()+Path+ "/";%>Then add base to the href= ">base>When you introduce an external file "directly" on this page, you can directlyScriptsrc= "Js/common/jquery-1.11.1.min.js"language= "JavaScript"type= "Text/
less files of all the modules.
To prove this, let's test a piece and add the following to the a.less:
@aaa: Red; @widthtest: 200px;. class2{ Background-color:green; border:5px solid Red;}
B.less content is as follows:
@import ' a.less ';d iv{ color: @aaa; Width: @widthtest; height:50px;}
Then compile b.less to get the contents of the B.css file as follows:
. class2 { background-color:green; border:5px solid Red;} div { color: #ff0000; width:200px; height:50px;}
In addition,
Relative path references in CSS and JS
Beginners because of some relatively basic knowledge of the grasp is not very strong, so in the development or design, it is often very easy to appear some errors or abnormal phenomena and can not find the source of the error. Remember that I just started in Java, there will be some very "bizarre" phenomenon, and then over and over again to see their own code, step-by-
Add base to the JSP page, using relative paths:
Copy Code code as follows:
String path = Request.getcontextpath ();
String basepath = request.getscheme () + "://"
+ request.getservername () + ":" + request.getserverport ()
+ path + "/";
%>
Then add base to
When you introduce external files "directly" on this page, you can directly
Copy Code code as follows:
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.