css多背景定位

标签 css wordpress

我有我的 wordpress 主题背景,

我有另一张图片,我想将它放在页面的中央,并从左到右水平重复它。

与这个网站非常相似http://www.tcs.com/homepage/Pages/default.aspx

非常感谢任何提示或说明。

谢谢

最佳答案

我会使用包装器来完成此任务。

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
body {
background-image: url(image1.jpg);
}
#wrapper {
background-position: center middle;
width:100%;
height:100%;
margin: 0px;
padding: 0px;
background-image: url(image2.jpg);
background-repeat: x-repeat;
}
</style>
</head>
<body>
<div id="wrapper">

</div>
</body>

关于css多背景定位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10485788/

相关文章:

css - </p> IE F12 开发者工具无法识别

html - index.html 看起来比网站的所有其他页面小

php - 安装 wamp 服务器后出现意外的 PhpMyAdmin 登录屏幕

php - Wordpress:从数据库中检索值

wordpress - Page Speed Insights 为 Google Recaptcha 删除未使用的 JavaScript

css - 谷歌浏览器中的字体损坏

html - 动态更改表格背景angularjs

html - 如何使用 Css 定位 SVG 加载器?

php - Mysql查询用all_in_one seo帖子标题替换WP帖子标题

wordpress - 如何在 WordPress 中更新 get_stylesheet_directory_uri