Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[getting started] how to get started learning DIV CSS technology?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Introduction:

To quote a passage from a book: "when I first started learning Chinese, my tutor, Lao Wang, gave me a Chinese-English dictionary, a Chinese grammar book and an elementary course." But he put the books in a basket and said they would not come in handy until next week. In the first week, he only taught me to listen and memorize some phrases. Before starting a strict and orderly study, he asked me to learn how to retell some essays. " Excuse me, where is the restaurant? " Please give me some rice. " How much is this dress? ". In that week, I had to accept knowledge, sentence structure, pronunciation and grammar unconditionally. However, on Friday, I was able to go to a Chinese restaurant to order a bowl of rice and pay the bill. There is no theory, no explanation, it is these simple phrases that give me enough grammar and vocabulary to do it.

I do not know since when, CSS began to attach importance to the Chinese people. Many people begin to learn CSS, but they don't know where to start, so this article is for beginners to take them on the CSS train. one。 CSS learning focuses on the method!

Learning everything is the same, from primary school, middle school, university, in addition to learning knowledge is to learn methods!

If you want to master CSS, you must first learn HTML. I started from scratch and spent a month learning HTML. Without a teacher, books are my only teacher and I have no access to the Internet. A month later, I began to study CSS. The first CSS book I read was "CSS Web Page style Design". After reading for a few days, I found that I couldn't understand it at all! And then changed to a "HTML reference book", which is a regular desk book for web creators! The reason for changing this book to learn CSS is that part of it is CSS, which becomes my CSS enlightenment book. After reading a few paragraphs, I feel that the tutorials written by foreigners are very organized, from shallow to deep, leading you forward step by step, so that you can understand what they are talking about, instead of being different in depth and lack of organization, as if you don't know that he is very knowledgeable! Just like the book "CSS Web Page style Design" mentioned earlier, I read it at that time. For me, as a beginner of CSS, I really don't know what it is talking about!

Let's talk about the details of the learning process, because it is impossible for a style to be separated from the HTML page, and if HTML is not combined with styles, CSS will lose its meaning of existence. So the general book will give an example, and then let you test the results on the computer, this is the author wants to give you a preliminary impression of the stylesheet CSS, tell you what CSS can do. A small example: "although the sparrow is small, it has five internal organs", you may not understand the true meaning of each sentence. But you can remember the model of the example, and it will be used constantly in practice, and the process of using it constantly is the process of remembering it constantly, so you can't recover your heart, and you can't always think that you have a bad memory, but no matter whether you ride a cow or a Chollima, as long as you have perseverance, you will reach the finish line.

Read a book, generally speaking, read the whole book for the first time, and read down what you don't understand. in the process of looking down, you may find the answer to that question. After reading it, you have a general impression, but there must be a lot of things you don't understand. It doesn't matter. Move on.

For the second time, you have to take study notes while reading, write down the parts that you think are the key points, and write down the parts that you think have questions. Read on with questions. If there is no answer, you can post a post on BBS. There are still many kind-hearted people. A hint: "you must learn how to ask questions!" Let's not say it here. You also have to get on the computer to practice the examples in the book, what puzzles you most: "one is that you can't remember, and the other is that you have a wrong understanding of the concept (this may be because the translation of the book is not good, and your understanding is wrong). You have to build up confidence in the first one and stick to it. When you reach the finish line, you will find that everything makes sense. Because you work hard, hard work will be rewarded, there will be results.

Many people have read it, but there has been no progress. My analysis is mainly for the following reasons:

Reason 1: pressure is not enough, because there are many people, such as art CSS, because it is to watch others learn, so learn it, do not learn, there is no advantage! This kind of pressure is very small, can not learn well and art this bowl of rice.

Reason 2: it's just part-time study, and it's just for fun, because you don't have to eat with this skill.

Reason 3: the method is wrong, some people are just reading tutorials, but he doesn't do it. I used to read too much and do too little, so you can rub the theory into it with practice. two。 Master the four learning stages of CSS

Once I asked a netizen, is it difficult to learn CSS? She said, "it's not difficult." I said, how long have you been studying? She said, "I just learned." In fact, she is also right! If someone asks me, is it difficult to learn CSS? I would say, "difficult!" Why would I say it's difficult?

Learning CSS can be divided into the following stages:

Stage 1: pages can be made without thinking about browser compatibility issues, but pages written in TABLE mode DIV are everywhere.

Phase 2: think of compatibility issues, but can not prevent them in advance, only fix them, and use HACK technology extensively (I only know about HACK technology, but use it very little)

Phase 3: BUG can be prevented in advance, but ID,CLASS,CSS is widely used in stylesheets to translate into overlapping stylesheets, such as "DIV P SPAN". This code marks the child element SPAN of P in the DIV child element, so that you can define the style of SPAN without adding CLASS to the SPAN. This is the advantage of CSS, why not take advantage of it and be sure to define a CLASS!

Stage 4: this stage is the most difficult, good HTML semantic structure, reasonable CSS, reusable style. Good semantics have articles in this area, reasonable CSS, these two aspects will certainly write special topics to study in the future. three。 Frequently asked questions for beginners of CSS:

Let's take it one step at a time. The first requirement is that there should be a title directly below the thumbnail. This is pretty straightforward: put a picture in your HTML, then a line break (BR), and then put the title in a paragraph (P) and center it (using CSS).

Then we will have these thumbnails arranged in pairs with the title in the browser window. When using table typesetting, this pair of thumbnails and titles are placed separately in the TD. When using CSS typesetting, we need to put them separately in DIV. To allow them to be arranged horizontally on the window, we use CSS to float the DIV to the left (FLOAT). Question1: what kind of books should you choose to read when learning CSS?

Recommend a few books first:

Authoritative Guide to CSS

"website restructuring"

"website layout record"

HTML reference Collection

If you don't know much about HTML, you can read the HTML reference Book, which is not only a teaching book but also a good reference book for querying HTML. Recently published "mastering CSS" and "unassailable Web Design" are very good books, but they are not suitable for people who do not have a CSS foundation. If you want to be an excellent CSS Builder, you need a solid foundation in English, so you can read foreign CSS tutorials and participate in relevant forums. Some people say that if you don't know English, you can only look at code, but in fact, their books discuss not only code, but more important. It is they who will tell us the idea of coding and the method of coding, which are worth learning and understanding. In addition, the Chinese tutorials I recommend are "HTML and CSS Standard", Su Shen Xiaoyu's "CSS2 Chinese Handbook", and the electronic version of "Web designer". There are many e-books in foreign English, so there are no examples. Reading e-books is a very boring thing, I am not used to reading electronic versions, so I often buy books to read.

Question 2: what software is used to edit CSS code?

This question seems to have been asked the most frequently! First of all, let me talk about myself. At first, I wrote code in DreamWeaver. Because DreamWeaver software itself consumes a lot of CPU and memory, you can imagine the speed of editing at run time. I walked for a long time before I reached the "half-handwritten" state. "half-handwriting" uses the code hint function provided by DW. When you write "F", the style of "F" will be prompted immediately behind for you to choose. If you write a few more letters, the style you want will be found quickly, which can speed up your style writing, but one disadvantage is that if you break away from the generation prompt editing software, you will not write the style. for example, when you modify a fine-tuning style with a programmer, he does not necessarily use the software you use and does not necessarily have code hints. So you have to go back to your machine and edit it and send it to the programmer! This is obviously unprofessional! So if you want to be an excellent person, you have to be professional!

Having said this, I don't seem to have come to the subject:

You can use any software as long as you can write by hand. It is recommended to use DreamWeaver plug-in TopStyle (the latest version is Pro V3.12).

Question 3: write HTML or CSS first?

There are many kinds of answers on the Internet: first write HTML, then write CSS;, first write CSS, then write HTML;. I tend to write both. Writing CSS first or writing HTML first is not an appropriate method for beginners. If you let a person write code, you tell him to write HTML first, HTML can not be modified after writing, and then you write CSS, if he can write it, then this person must be a very high-level Builder! So for beginners, in most cases I suggest writing it at the same time, and I'll talk about the steps:

1.

First, we have to build the site, the directory, for example, we build the folder CSS,IMAGES, these two are the most original, and then create a new HTML file, a style.css and an empty stylesheet, and connect the HTML page to the external stylesheet. Then we first write the most basic layout parts of the HTML, all using DIV, and then directly add ID or CLASS to the DIV, including the coat part, the head part, the middle part, the left, middle, right, copyright part and so on. After you've written this, you can write the style in the stylesheet, or you can go on to write the part of the layout. Let's take the head as an example, write LOGO in the header, and add ID or CLASS to the NAV. Everything else is the same.

two。

Why is it impossible for us to write the HTML part at once, because people can make mistakes, maybe there are problems in the process of writing your ideas, or for the sake of browser compatibility, some of them are not expected in advance because of your lack of experience, so when you find problems in writing styles, you may have to change your HTML code. Big enough to write in this way, you can also HTML/CSS at the same time, all can, depending on your habits. When we write code, we often test while writing code, not writing a test sentence, but testing the browser after writing a piece of code. I test with IE6 and FF at the same time. A good producer their code is mostly written a lot before they test it, because if a person has more experience, they will know and prevent the occurrence of browser error display in advance! So they write code faster than inexperienced people. They have experienced the mistakes you have to experience, and the first time you encounter a wrong browser display problem, it will take you time to fix it, and they can prevent it in advance or solve the problem immediately! This is one of the differences between you and them.

Another difference between beginners and experts is that experts use a large number of keyboard shortcuts, so be sure to remember those commonly used keyboard shortcuts, every small detail has a little improvement, taken together is a great improvement.

In addition, the best way to improve your level is to practice more, find some better HTML CSS templates for coding practice, choose a simple one at the beginning, take a screenshot of the page, and then restore this picture to a HTML page with your own ideas.

Finally, I wish you all progress in your study.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report