Home > front end >  Web page background image stretching length how to custom
Web page background image stretching length how to custom

Time:09-17

On mooc learned a course, but the end is quite long, before have a job, request the picture on the web page as the background, and put a piece of writing, and then adjust the text location and style; Tried several ways, background of stretching is really don't know how to set up, want to ask next, how should adjust

My style is written like this:
<style>
Div {white - space: the pre - wrap; Width: 652 px; Height: 1044 px; Margin: auto; Background: url (" images/bg_homework. PNG "); Padding - top: 150 px; Padding - left: 200 px; Box - sizing: border - box}
H1} {the font-family: "Microsoft jas black"; }
P {width: 370 px; The line - height: 1.8 em. text-indent: 2em; The font - size: 12 px; }
</style>
Do it can only achieve this effect, excuse me what reason be?

CodePudding user response:

Background: url (" images/bg_homework. PNG ") no - repeat;
background-size: 100% 100%;

CodePudding user response:

reference 1st floor qq_42900789 response:
background: url (" images/bg_homework. PNG ") no - repeat;
background-size: 100% 100%;


Thank you, but I don't have to, or didn't change

CodePudding user response:

The homework on the sofa afraid not background that should be the img tag text are not covered in the above

CodePudding user response:

Still have even if you clearly is not the same as on the drawing that the spacing or is not someone else's phone long made the effect you want to shorten the distance between or get the height of the div high mobile phone is you use px with adaptation problems this absolute pixel out this kind of problem is normal

CodePudding user response:

reference 5 floor sha worm agent reply:
and you obviously is not the same as on the drawing that the spacing or is not someone else's phone long made the effect you want to shorten the distance between or get the height of the div high mobile phone is you use px with adaptation problems this absolute pixel out this kind of problem is very normal

Is that the material is longed for curriculum packaged inside, the whole picture is like this, I try to reduce the paragraph spacing, the other is the mobile phone is also a work package artwork, not screenshots, I don't know how to put the background the stretched the length of the cell phone, try, and a lot of options are bosses do you know how
  • Related