The following are some of my own thoughts and gains. Due to my shallow personal knowledge, if there is something wrong or inaccurate, please criticize and correct me.
The three musketeers of front-end development, HTML, CSS, and JS, are well-known and are the basis for getting started with the front-end. Front-end programmers use these three components to form a large number of web pages. However, when you first learn, because you cannot quickly understand all the knowledge points, you often feel like a blind person trying to grasp the elephant when learning - that is, you do not know much about the functions and division of labor of each component, and you cannot grasp the direction of learning as a whole, so it is difficult. Forming a complete knowledge system is a headache. I have a characteristic in learning. I like to start from the bottom knowledge, and then add other content layer by layer on this basis, and finally form a complete framework. This is the way I'm used to learning.
At the beginning, I was still a little dizzy. The knowledge points were one after another, and they also overlapped with each other. The front was connected to the back, and the back was connected to the front. It still took a lot of effort to understand. But after reading the entire content two or three times, the entire framework becomes much clearer. Simply put, the division of labor in HTML, CSS, and JS embodies the concept of software layering. The general function distribution is: HTML is responsible for describing content, CSS is responsible for describing the style of elements, and JS is responsible for implementing the actions of the web page. In this way, it is actually not clear enough. Newbies can’t quite understand it. I think we can understand why there are these three divisions from the development process of web pages.
Early web pages were static web pages, and the elements in the web pages basically had no action. People went online mainly to browse information, and the interactivity requirements for web pages were also low. We can take a look at Yahoo's website in 1996 (the picture is taken from the Internet). There are pictures, hyperlinks and search boxes on the web page. Most of them use the default style. Such web page style and content are mixed together. If you want to modify the style of the web page , you need to modify them one by one, which will be more troublesome. So how to solve this problem? The pioneers of web development separated the style from the content and combined all the statements describing the style of the web page into one file. This file is called a cascading style sheet, or CSS for short. If we want to modify the style, we can modify it from this file. Through some selectors, we can quickly change the style of a certain element or a certain type of element, thus improving efficiency.
After removing the style from the web page, the HTML language is only responsible for describing the content of the web page. What does this mean? In HTML, we use the
element to mark the header file, the element to mark the name of the web page, the element to mark the body of the web page, the
element to mark the table, etc., by adding these elements By filling in the content in the element, we write nodes with specific styles. All these HTML nodes constitute the content of the web page. Most of these tags have default styles. If we are not satisfied with the default styles, we can also modify them in the CSS file.
After completing the separation of content and presentation, we have to explain the actions of the web page. One problem with static pages is that the content of the web page will not change after it is generated. When we browse the web, we need to interact. We need to log in to Weibo to comment, like and forward. We need to control the actions of characters when playing web games. These functions are all carried by JavaScript (JS).
JavaScript is a lightweight programming language. It does not have strict regulations on data types like C/C/JAVA, nor does it have pointers, operator overloading, etc. Speaking of which, the name is very confusing. There is Java in the name, but everyone says it has nothing to do with Java. This is really a headache. This is like making a movie called "My Name is Pan Jinlian" but saying that you have nothing to do with Pan Jinlian. (Laughs) Just kidding. However, in comparison, the syntax of JavaScript and Java have many similarities, but JavaScript is much simpler than Java. Unlike Java, JS is a platform language with various components and frameworks. JS is closely linked to the web. JS is executed by inserting it into HTML. Through JavaScript, we can write HTML output, react to events, change HTML content, images, styles, verify input and other functions. Basically all interactions on the web page are implemented through JS functions. This part is also the most difficult part in The Three Musketeers, and I am only so-so at mastering it now. Later articles will expand on specific knowledge points.
JS files and CSS files are ultimately applied to HTML. In HTML, we can insert JS code through the
There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.
There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.
HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.
To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-
To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.
Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.
Answer: You can use the date picker component of Bootstrap to view dates in the page. Steps: Introduce the Bootstrap framework. Create a date selector input box in HTML. Bootstrap will automatically add styles to the selector. Use JavaScript to get the selected date.