我在我的网站上使用backstretch.现在尝试从左到右自动移动背景幕.但直到现在,它只是向一个方向移动.我期待着那个动态图像的连续循环.
如何重置/移回图像?
backstretch.js:http://dev.disaster-kfw.com/fileadmin/template/js/slidebackground.js
一些更多的javascript用于移动效果和初始化
var images = ['fileadmin/template/gfx/background02-03.jpg'];
jQuery.backstretch( images[Math.floor(Math.random() * images.length)] );
jQuery(function($){
(function swoop(element) {
element
.animate({'margin-left':'-=5px'}, 100, function(){
setTimeout(function(){
swoop(element);
}, 0);
});
})($('#backstretch img'));
});
Run Code Online (Sandbox Code Playgroud)
产生这个HTML输出
<div id="backstretch" style="left: 0px; top: 0px; position: fixed; overflow: hidden; z-index: -999999; margin: 0px; padding: 0px; height: 100%; width: 100%;"><img src="fileadmin/template/gfx/background02-03.jpg" style="position: absolute; margin: 0px 0px 0px -3404.98890491151px; padding: 0px; border: none; z-index: -999999; width: 3006px; height: 835px; left: -551.5px; top: 0px;"></div>
Run Code Online (Sandbox Code Playgroud)
对不起发布html代码有点难看,不知道做对了...
编辑:
非常感谢,但我认为这不是我需要的.
我想我需要一个关于图像宽度和左边距的计算,以便从左移动到右移动和后移动.
所以我试着计算我的图像的宽度,但是 …
过去,我们通过将页面放入“元”或“子菜单”之类的页面来组织页面树中的页面。这些页面具有“从说 url 中排除”选项,因此它们的名称不会呈现到 url。
在 TYPO3 9.5 中是否有任何选项可以忽略生成“slug”的页面?
例如:
错误:https://www.somedomain.tld/metamenu/terms-and-conditions/
右图:https://www.somedomain。顶级域名/条款和条件/
如何“忽略”页面“元菜单”以自动生成slug?
最好的问候约翰内斯