Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何使图像在包含区域中重复_Html_Tumblr_Tumblr Themes - Fatal编程技术网

Html 如何使图像在包含区域中重复

Html 如何使图像在包含区域中重复,html,tumblr,tumblr-themes,Html,Tumblr,Tumblr Themes,tumblr中有一种新型的标题,其中包含一个框,框中有一个bg,可以在滚动页面时滚动。但是我发现它在封闭区域不起作用。我什么都试过了。下面是我的代码: background-image: url(https://static.tumblr.com/cqouips/64cpa8678/cool-blue-fire-backgrounds-4013-hd-wallpapers.png); background-attachment: fixed; background-repeat: repeat;

tumblr中有一种新型的标题,其中包含一个框,框中有一个bg,可以在滚动页面时滚动。但是我发现它在封闭区域不起作用。我什么都试过了。下面是我的代码:

background-image: url(https://static.tumblr.com/cqouips/64cpa8678/cool-blue-fire-backgrounds-4013-hd-wallpapers.png);
background-attachment: fixed;
background-repeat: repeat;
font-size: 12px;
background-color: #000;
font-family: 'Quicksand', sans-serif;
color: #dbdbdb;
padding: 1px;
text-shadow: 1px 1px 0px #000, 1px -1px 0px #000, -1px -1px 0px #000, -1px 1px 0px #000, 0px 1px 0px #000, 0px -1px 0px #000, 1px 0px 0px #000, -1px 0px 0px #000;
padding: 6px 15px 6px 15px;
letter-spacing: 1px;
border: 2px double #f1f1f1;
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;

看起来您可以使用“背景大小”属性,“封面”设置将使图像增长以适合容器

背景尺寸:封面

<style>
div{background-image: url(https://static.tumblr.com/cqouips/64cpa8678/cool-blue-fire-backgrounds-4013-hd-wallpapers.png);
background-attachment: fixed;
background-repeat: repeat;
font-size: 12px;
background-color: #000;
font-family: 'Quicksand', sans-serif;
color: #dbdbdb;
padding: 1px;
text-shadow: 1px 1px 0px #000, 1px -1px 0px #000, -1px -1px 0px #000, -1px 1px 0px #000, 0px 1px 0px #000, 0px -1px 0px #000, 1px 0px 0px #000, -1px 0px 0px #000;
padding: 6px 15px 6px 15px;
letter-spacing: 1px;
border: 2px double #f1f1f1;
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;

background-size:cover;
}
<style>
</head>
<body>
<div>
test <br />
test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />test <br />
</div>

div{背景图像:url(https://static.tumblr.com/cqouips/64cpa8678/cool-blue-fire-backgrounds-4013-hd-wallpapers.png);
背景附件:固定;
背景重复:重复;
字体大小:12px;
背景色:#000;
字体系列:“流沙”,无衬线;
颜色:#dbdb;
填充:1px;
文本阴影:1px 1px 0px#000,1px-1px 0px#000,-1px-1px 0px#000,-1px 1px 0px#000,0px 1px 0px#000,0px-1px 0px#000,-1px 0px 0px 0px#000;
填充:6px 15px 6px 15px;
字母间距:1px;
边框:2倍双色#F1F1;
文本转换:大写;
字母间距:3px;
文本对齐:居中;
背景尺寸:封面;
}
测试
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
/>试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验

试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
试验
/>测试
测试
测试
测试
测试
测试
测试
测试
测试

删除
背景附件:固定

无背景附件:已修复

.someClass{
背景图片:url(https://static.tumblr.com/cqouips/64cpa8678/cool-blue-fire-backgrounds-4013-hd-wallpapers.png);
背景重复:重复;
字体大小:12px;
背景色:#000;
字体系列:“流沙”,无衬线;
颜色:#dbdb;
填充:1px;
文本阴影:1px 1px 0px#000,1px-1px 0px#000,-1px-1px 0px#000,-1px 1px 0px#000,0px 1px 0px#000,0px-1px 0px#000,-1px 0px 0px 0px#000;
填充:6px 15px 6px 15px;
字母间距:1px;
边框:2倍双色#F1F1;
文本转换:大写;
字母间距:3px;
文本对齐:居中;
}

Hi。虽然链接很有用,但最好在答案中添加一个代码示例。这样一来,如果链接确实过期,该代码仍将提供给最终登录此页面的疲惫旅行者。