如何根据与HTML / CSS内容的高度放置一个负责任的背景是什么? [英] How to place a responsive background according to content height with HTML / CSS?

查看:124
本文介绍了如何根据与HTML / CSS内容的高度放置一个负责任的背景是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要实现这样的背景下进入我的网站主要内容是:

I need to implement this background into my websites main content:

左和右条带应响应和其高度增加,如果含量变大。

the left and right stripe should be responsive and grows in height, if content becomes bigger.

问题是,我不知道的主要内容会多大,所以我怎么砍它,并把它按高度?有多少件,我需要,我如何把它们与CSS?

The problem is, I dont know how big the main content will be, so how do I cut it and place it according to the height ? how many pieces do I need and how do I place them with css?

有人可以解释这样对我?

Can someone explain this to me ?

与亲切的问候

推荐答案

如果您只需要高度支持,切成3件:上部,中部和底部。设置背景与重复y的中间部分,并且放在顶部的上部和下部:0和底部:0分别,你应该做的。

If you only need height support, cut it into 3 pieces: upper, middle, and bottom. Set the background to the middle part with repeat for y, and place the upper and lower parts in top:0 and bottom:0 respectively, and you should be done.

这篇关于如何根据与HTML / CSS内容的高度放置一个负责任的背景是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆