1, the picture with tags added to the page, will increase the size of the page, resulting in the page load takes longer time. You can use CSS background to refer to a picture.1.1. If the image is part of "content" rather than "style", such as "Company Profile" page, a photo of CEO, Apps Tags2, do not use the table layout, each time the page loads, the browser must reload the various content, and redraw it. With
directly expand or trf abbreviate to get a valid vendor prefix attribute.Explicitly vendor prefixesSometimes you might want to output a CSS property with only the specified vendor prefix attribute.Assuming you want to output webkit only moz the attributes with and prefixes transform , you can write the following abbreviations:-wm-trfAs we have seen, we have slightly modified the abbreviation by adding a list of character prefixes. In this case, the w
Some time ago, I finally got my long-awaited book "Zen of design patterns", but for work reasons, there is no time to calm down and savor the Zen words from my work practices. I put this book in front of my bed. Whenever I go to bed, I will flip it over. I have read some books on design patterns before, but I want to g
stories" of the Bible ". This book is the "Zen" of the Bible. It is not as esoteric, obscure, or difficult as the Bible, because of the treasure of words such as gold and character, it is more profound and comprehensive than the "Comments" version of the "Bible", more popular and vivid, closer to the practical scenarios encountered by developers, and more instructive. This book is a milestone in the field of desi
Reprint: http://www.javaweb1024.com/java/Javajichu/2015/04/09/535.htmlDesign pattern of Zen First second edition http://www.javaweb1024.com/info/403.jspxThe 7th chapter of the single case model7.1 I am the emperor, my only one.Since the Qin Shihuang established the position of the emperor, the same period is basically only one person sitting alone in this position. In this case the subjects are also good to deal with, when we bow down, talk about the
requires the class "shy" point, try not to publish too many public methods and non-static variables, as far as possible, more introverted, use private, package-private, protected and other access rights
It's your own, it's yours.In the actual application of such a method often appears: Put in this class can also, put in other classes also not wrong, how to measure it? You can stick to the principle that if a method is placed in this class, it does not increase the relationship between the c
Zen-interface isolation principle in Design ModeTwo types of interfaces: (1) instance Interface (2) Class Interface, use Interface-defined Interface isolation: (1) the client should not rely on interfaces that it does not need (2) the dependency between classes should be based on the smallest interface. Scenario Description: you are bored on the street one day, shouting a beautiful girl on the street. As a
zhang...i am Qinyi zhang...i am Qinyi zhang...i am Qinyi zhang...i am Qinyi Zhang ...Below, see what the class diagram is, very simple, no inheritance, and so on.In the book, a design method called "Multiple cases Mode" is derived from the singleton model, that is, a class can produce multiple objects, but the number of objects is limited.It is also an example of the emperor, but there are many emperors in this example, and every minister may find a
obtained the object (which takes time), the second thread B is also executing, executing to (Singleton = = null) judgment, then B gets the judging condition to be true, and then continues to run. When A and B both acquire an object, a bug is created.You just need to change the code just like this.public static synchronized Singleton getSingleton(){ if(singleton == null) singleton = new Singleton(); return Singleton; }----------2、需要考虑对象的复制情况,在java中对象是默认不可复制的,若实现了Cloneable接口,并实现了
This "Zen of design patterns" was not easy to get. At that time, I had the honor to ask Qin Xiaobo in the csdn forum. Reading such a classic book cannot be like reading a novel. It is intended to be a pleasure to go around for a long time. It is more about reading and changing questions. Why should we ask every key point. Teacher Qin Xiaobo's language is sometimes humorous and sometimes important. Mr. Qin X
staticpublicclass HumanFactory{ //这里是 publicstaticcreateHuman(Classnull; try{ human = (Human)Class.forName(c.getName()).newInstance(); }catch(Exception e){ System.out.println("人类生产错误"); e.printStackTrace(); } return (T)human;}}2. Upgrade to multiple factory classesWhen we are working on a more complex project, we often encounter an effort to initialize an object, and all product classes are initialized in a factory method, and t
Zen-singleton mode in Design Mode
Personal blog this blog address: http://www.sanyinchenblog.com /? P = 233
Singleton mode:
Make sure that a class has only one instance, and instantiate it and provide the instance to the entire system.
Demo (https://github.com/sanyinchen/UMLDemo)
General View (hunger style ):
Single sample Common Code Template:
public class Singleton{private static final Singleton single
CSS design guide, Study Notes 1, css design guide
This article is about some notes and Experiences after reading Charles Wyke-Smit's "CSS design guide" over the past few days. I seem to be getting started with web
Chapter 1 design pattern: Making CSS easier
On the surface, CSS seems easy. It has 45Commonly used properties you can employ to style a document. below the surface,Different combinations of properties and property values trigger completelyDifferent results. I call this CSS polymorphism because the same property has al
For the use of P and CSS design is also more interesting design effect, this article will give you a simple introduction of the next p and CSS implementation of radio list design, how to achieve the effect of P and CSS implementat
Summary of the CSS Design Guide by reading and learning booksCSS Design Guide/charles lvyke-smith. Lisongfeng-People post and Telecommunications publishing houseBook site: http://www.stylinwithcss.comHighly Recommended!! Simple, concise, suitable for beginners!!
How CSS Works 2.1 parsing
to design a reasonable navigation form. Here we will use CSS to design the three commonly used navigation forms to see how CSS implements these styles.
Horizontal navigation
There is a big difference between creating navigation by using CSS layout and table layout. In a
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.