html6imgcss
html6img
:
html6imgcss
html6img
:
whitespace is caused by blank lines between img tags. The solution is to set the font-size of the parent element of the img tag to 0 or write the img tag more compactly as
as
here is the implementation
body {
margin: 0;
padding: 0;
font-size: 0;
}
img {
padding: 0;
margin: 0;
display: inline-block;
width: 33.3vw;
height: 33.3vw;
background-color: green;
}
img:first-child {
float: left;
width: 66.6vw;
height: 66.6vw;
}
the baseline of the elements in the line is in trouble. Img is an inline element, and the default display: inline; is similar to the default behavior of the text, with the bottom edge aligned to the baseline rather than the bottom edge of the container. Set fontsize to 0.
Portal CSS deeply understands the relationship between vertical-align and line-height
it is suggested that the font-size of the parent element of the img tag be set to 0,
you can use the Grid layout of CSS
commonly known as" ghost blank node ". For details, please refer to Zhang Xinxu's blog and add font-size:0
to the parent tag of the img tag.
img tag inline elements. By default, inline elements. In order to make the elements on a line have a uniform reference alignment object, there is a setting of baseline alignment by default. Because there is a baseline, there is only one more gap. Vertical-align: baseline (default) / top/bottom;
can be solved by changing the alignment object within the line.Previous: The problem of taking stairs in algorithm
Next: Process finished with exit code-1073741819 (0xC0000005)
A timing examination system is triggered if the click event is triggered within 5 seconds, and if it is not triggered, the system marks the correct answer at the end of the countdown. How to implement ...
I got a set of data, which is to choose the type of question. How can I tell if I have chosen the right one answera: "Olympic Games " answerb: "Asian Games " answerc: "Paralympic Games " answerd: "University Games " id: "1772 " question: "f...
...
do the gods have plug-ins for uploading attachments in the mobile version that can also be uploaded more than one? ...
what is the current level of support for vw,vh layouts in mobile browsers? ...
...
the traditional position: fixed; is relative to the window, and there are two main points of the problem . relative to the specified parent element fixed positioning encountered the following problems in mobile development. The green box is the...
as shown in the red box of the second picture, is there any recommendation for this plug-in? Thank you. the screenshot is uploaded, so let s just look at it. nothing can be found in vueawesome. ...
I would like to ask why the clear floating code I wrote is invalid. and. How to use the flex layout to make the horizontal arrangement of the above two div fill the entire screen. The third div is filled with the bottom location. code is as follows: `...
want to explain how to make table different colors? is not different. is . <table> <tr> <td width="100">a< td> <td><a>< td> < tr> <tr> ...
there is an h5 page embedded in the encapsulated APP. After the function of issuing an order, how can I get the user s id to add the address and place the order ...
A picture grows slowly when it slides up to a certain extent. Why does it bring out a line that has been entangled all night? I can t find the reason. ...
A similar question, I want to know how to deal with the number of correct answers. I originally wanted to declare a variable and then decide to add it when the answer is right, but not if it is wrong. But what is printed is always 0 and 1 ....
mac chamfering effect, the display is abnormal, the code is as follows, please take a look at ...
I wonder if there is any ready-made reset library based on sass, similar to reset.css . Please also recommend a responsive framework based on sass (designed to solve responsive problems) or a useful sass mixin library ...
<template> <div style="height: 100%;"> <mt-header title=""> <mt-button icon="back" slot="left" v-tap="{methods: switchView, view: Post }">< mt-button> &l...
apply the transform attribute to a div, and then click it to add a class name, which is also a transform, in the class, but then it moves relative to the original location. How to make her want to move for the current location? ...
<template> <div style="height: 100%;"> <mt-header title=""> <mt-button icon="back" slot="left" v-tap="{methods: switchView, view: Post }">< mt-button> &l...
make an answer system, trigger the click event on the answer page (choose the correct answer), and add 1. No mistakes. Now the whole answer is finished. Jump to another page, that is, the answer completion page, how can I get the value of the correct ans...
how to set the input box of element when there is no content, the width is 0 and the width is adaptive when there is content ...