It’s the same when learning anything. From elementary school, middle school, to university, in addition to learning knowledge, you also need to learn methods!
If you want to master CSS, you must first learn HTML. I started learning from scratch and spent a month learning HTML. I had no teacher, so books were my only teacher, and I didn’t have access to the Internet! A month later, I started learning CSS. The first CSS book I read was "CSS Web Style Design". After reading it for a few days, I found that I couldn't understand it at all! , and then changed to the "HTML Reference Encyclopedia". This book is a regular desk book for web page designers! The reason why I changed this book to learn CSS is because part of it is CSS, and it became my CSS enlightenment book. After reading a few paragraphs, I feel that the tutorials written by foreigners are very organized, starting from the shallower to the deeper, and leading you forward step by step, so that you understand what they are talking about, unlike the domestic books that have different depths and lack of organization. , as if he is afraid that you don’t know that he is very knowledgeable! Just like the book "CSS Web Style Design" mentioned earlier, I read it at the time. As a beginner in CSS, I really had no idea what it was talking about!
Let’s talk about the details of the learning process, because a style cannot be separated from the HTML page. If HTML is not combined with the style, CSS will lose its meaning. Therefore, the book will usually give an example and then let you test the effect on the computer. This is because the author wants you to have a preliminary impression of style sheet CSS and tell you what CSS can do. A small example: "Although a sparrow is small, it has all five internal organs." You may not understand the true meaning of each statement. But you can remember the pattern of the example and use it continuously in practice in the future. The process of continuous use is the process of continuous memorization, so you can’t relax and always think that your memory is not good, but it doesn’t matter whether you are riding an ox or a thousand-mile horse. No matter what, as long as you have perseverance, you will definitely reach the end.
When reading a book, generally speaking, you should read the entire book for the first time. If you don’t understand, you should read on. In the process of reading, you may find the answer to that question. After reading it, you will have a general impression, but there must be many things you don’t understand. It doesn’t matter, just keep reading.
For the second time, you have to take study notes while reading. Write down the parts that you think are the key points. Also, write down the parts that you think you have questions about. Keep reading with questions. If there is no answer, you can post a post on BBS. There are still many kind-hearted people. Here is a reminder: "You must learn how to ask questions!" I won't go into that here. You have to go on the computer to practice the examples in the book. What confuses you the most is: "First, you can't remember it, and second, you have a wrong understanding of the concept. (This may be because the book is not translated well, and the other is that your understanding is wrong." )", for the first one, you have to build up confidence, persist and persist. When you reach the end, you will find that everything is a matter of course. Because if you work hard, you will be rewarded and have results.
A lot of people have also read it, but there is no progress. I analyze the main reasons are as follows:
Reason one: There is not enough pressure, because many people, such as artists, learn CSS, because You learn it by watching others learn it, so if you don’t learn it, you will have no advantage! This kind of pressure is very small. If you don't learn well, you will still have a job as an artist.
Reason 2: It’s just a part-time study. Learning this way is just for fun, because you don’t necessarily have to make a living with this technology.
Reason three: The method is wrong. Some people are just watching the tutorials, but they don’t do it. I used to watch too much and do too little, so only with practice can you put the theoretical things into practice. Rub it in.
The Four Learning Stages of Mastering CSS
Once I asked a netizen, is it difficult to learn CSS? She said, "It's not difficult." I asked, "How long have you been studying?" She said: "Just learned". In fact, what she said is right! If someone asks me is it difficult to learn CSS? I would say: "It's difficult!" Why would I say it's difficult?
Learning CSS can be divided into the following stages:
Stage 1: You can create a page without thinking about browser compatibility issues, but the page is written with TABLE mode DIV everywhere page.
Stage 2: Thinking of compatibility issues, but unable to prevent them in advance, only fixing problems, using HACK technology extensively (I only know about HACK technology, but use it rarely)
Stage Three: BUGs can be prevented in advance, but ID, CLASS are widely used in the style sheet, and CSS is translated into overlapping style sheets, such as "DIV P SPAN". This code marks the sub-element SPAN of P in the sub-element of DIV. By writing this way, you can define the style of SPAN without adding CLASS to SPAN. This is the advantage of CSS. Why not make good use of it and be sure to define a CLASS!
Stage 4: This stage is the most difficult, good HTML semantic structure, reasonable CSS, and reusable styles. There are articles about good semantics and reasonable CSS in this area. I will definitely write a special topic to study these two aspects in the future.