You must not know how the pictures in the div are centered horizontally and vertically

You must not know how the pictures in the div are centered horizontally and vertically

You must not know how the pictures in the div are centered horizontally and vertically. Here, the editor provides five centering methods. Let’s take a look. body structure Method 1:Set display to table-cell, then set text-align to center for horizontal centering, and set vertical-align to middle for vertical centering. The result is shown in the figure below:It is realized by position positioning. Set p to relative positioning, and set img to absolute positioning, left: 50%, top: 50%. At this time, the upper left corner of the picture is at the center of p. If the center of the picture is at the center of p, You need to move the image up by half the image height and to the left by half the image width. The result is shown in the figure below:It is still achieved through position positioning. Set p to relative positioning, and set img to absolute positioning, left: 50%, top: 50%. At this time, the upper left corner of the picture is at the center of p. If the center of the picture is at the center of p, you need to place the picture Move half the height of the picture up and half the…

Two minutes to understand the usage of a tag in html

a is an HTML language tag. The a tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the a element is the href attribute, which specifies the target of the link. Let’s take a look together. A tag will focus and automatically appear a dotted frame after clicking? Solution: 1.css processing method a{ outline:none;} 2. Add listening events, automatically lose focus (not recommended) 3. Inline processing style The label opens the link in a new tab value description _blank Open the linked document in a new window _self default Open the linked document in the same frame _parent Open the linked document in the parent frameset _top Open the linked document in the entire window framename in the specified Open the linked document in the frame vue opens a new page: let routes = this.$router.resolve( { path: '/position/recruit/job/desc', query: { id: row.id } } ) window.open(routes.href, & #39;_blank& #39;) Thank you for reading, I hope you will benefit a lot. This article is transferred from: https://blog.csdn.net/weixin_45266125/article/details/103199755 Recommended tutorial: “HTML Tutorial” The above is two minutes to understand html For more details on the usage of the a tag, please pay…

Teach you how to introduce external JS files in HTML

attack.html code: attack.js code function attackEnemy() { document.write(“land on”); alert(“ready go”); } Thank you for reading, I hope you will benefit a lot. This article is transferred from: https://blog.csdn.net/u012871987/article/details/72638373 Recommended tutorial: “HTML Tutorial” The above is to teach you how to For more details on introducing external JS files into HTML, please pay attention to other related articles on 1024programmer.com!

5 ways to express HTML spaces that you must not know

HTML provides 5 kinds of space entities (space entity), they have different widths, non-breaking spaces are the width of regular spaces, and can run on all major browsers. Several other types of spaces have different widths in different browsers. It is called No-Break Space, the full name is No-Break Space, it is the most common and we use the most space, large Most people may only touch it, it is the space generated by pressing the space key. In HTML, if you use the space bar to generate this space, the space will not be accumulated (only counted as 1). It can only be accumulated if it is represented by html entities. The width of the space is obviously and strongly affected by the font.   It is called “half-width space”, the full name is En Space, en is the measurement unit of typography , which is half the width of an em. By definition, it is equal to half the font size (e.g. 8px in a 16px font). Nominally the width of a lowercase n. This space inherits the consistent characteristics of the space family: transparent, this space has a very robust feature, The width it occupies is exactly…

What is the usage of onclick in html

The usage of onclick in html is to execute the script when the mouse is clicked. Onclick is an attribute of the HTML tag object. When the mouse is clicked, the Javascript script set to be executed is executed. The usage of onclick in html is to execute the script on mouse click event, onclick is an attribute of HTML tag object, Execute the Javascript script set to be executed when the mouse is clicked. The onclick attribute is triggered by a mouse click on the element. Note: The onclick attribute does not apply to the following elements: , , , , ,,, , , or . Related introduction: HTML is called hypertext markup language, which is an identification language. It includes a series of tags. Through these tags, the document format on the network can be unified, and the scattered Internet resources can be connected into a logical whole. HTML text is a descriptive text composed of HTML commands, which can explain text, graphics, animations, sounds, tables, links, etc. Hypertext is a way of organizing information. It associates text, graphics and other information media in the text through hyperlinks. These interrelated information media may be in the same text,…

Learn about script tags in HTML

Students who have studied a little web page writing know that the js code in the web page should be written in the script tag, but why do you want to do this? This article introduces the script tag. script tag At first, Netscape wanted to display the html file using js in the browser, but did not want to affect the display effect of this file in other browsers, so Created the script tag We all know that tags can add attributes inside, the script tag has the following attributes: async means downloading the script immediately, it should not hinder the interface Other operations src indicates the external file to execute this script, optional charset src specifies the character set of the external file defer script is delayed until document parsing Execute after the display is completed, optional language is obsolete type is important, used to replace the language attribute, the default is text/Javascript, so this parameter generally does not need to be specified. Note: The rest of the content on the page will not be loaded or displayed by the browser until the interpreter has finished evaluating the code in the script tag If there is js code…

One minute to understand the three linking methods of CSS in Html

There are three linking methods for CSS in html, do you know which three? The three link methods of css text are inline definition, link to internal css, and link to external css. Let’s take a look together. There are three ways to link css text: inline definition, link to internal css, and link to external css 1 .The code is: Inline definition Inline definitions Inline definition 2.The code is: Link into internal css Link into internal css 3.The code is: Link in external css Link in external css Link in external css The style.css of code 3 is in the same folder as your html file. The code is: #p1{ border: 2px; color:red;} #p2{ border: 2px; color:blue;} .p3{ border: 2px; color:red;} In css id should be preceded by a # class should be preceded by one. Supplement: lalala Thank you for reading, have you learned? This article is transferred from: https://blog.csdn.net/weixin_43670802/article/details/94174581 Recommended tutorial: “HTML Tutorial” The above is to understand Html in one minute For more details about the three link methods of CSS, please pay attention to other related articles on 1024programmer.com!

Have you studied HTML5 seriously? Then all the books you should read are here

In recent years, with the rapid development of the Internet, HTML5 in the front-end field of the Web is becoming more and more popular, and the demand for professionals in the H5 direction is also increasing. For Xiaobai who is new to this technology, he still doesn’t have a clear understanding of HTML5, and he doesn’t know where to start if he wants to get started. Everyone has been helpful. 1. “Head First HTML5 Programming (Chinese Version)” The books in the Head First series have been recommended many times, and they are indeed very suitable for beginners Read In this book you will understand the basics of HTML5’s new APIs, learn how these APIs interact with your pages, how Javascript can help these APIs, and how to use these APIs to build The web application that impresses your boss and friends. 2. “HTML5 Definitive Guide” It is an authoritative reference book for systematically learning web design The first part will be like you Explains the basics and new features of HTML5 The second part discusses HTML elements and details the new and modified elements in HTML5 The third part explains CSS, covering All CSS selectors and properties that control the…

What is the html code to set the table title

The html code for setting the title of the table is “ “, the function of the “ ” tag is to define the title of the table, and the “ ” tag must be placed directly in the “ ” tag. The tag defines the caption of the table. tags must be placed directly after the tag. You can only define one header per table. Tip: Usually this title will be centered on the table. However, the CSS properties “text-align” and “caption-side” can be used to set the alignment and display position of the caption. Differences between HTML 4.01 and HTML5 HTML5 does not support the align attribute. HTML 4.01 has deprecated the align attribute. For more relevant knowledge, please visit the PHP Chinese website! The above is the detailed content of the html code for setting the table title. For more information, please pay attention to other related articles on 1024programmer.com!

What is the attribute of the body element for the background color

The attribute used for the background color of the body element is bgcolor. The bgcolor attribute is used to specify the background color of the table. Grammatical structure: [], where color_name indicates that the specified color value is the background color of the color name. color_name specifies the color value The background color for the color name (eg “red”). hex_number specifies the background color of the hexadecimal value (eg “#ff0000”). rgb_number specifies that the color value is the background color of the rgb code (e.g. “rgb(255,0,0)”). Note: In HTML 4.01, the bgcolor attribute of the body element is deprecated; in XHTML 1.0 Strict DTD, the body element’s bgcolor attribute. CSS is recommended instead. CSS syntax: The above is the body For more details about the attributes used by elements for the background color, please pay attention to other related articles on 1024programmer.com!

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索