[英]CSS how is width getting set?
I have inherited a web page that has a slide show on it and I can't figure out how to change the width of the <article>
containing the slide show. 我继承了一个上面放有幻灯片的网页,但我不知道如何更改包含幻灯片的
<article>
的宽度。 I think it is getting size via JavaScript, but I have searched and can't figure out where. 我认为它是通过JavaScript来获取大小的,但是我已经搜索过了,无法确定在哪里。
If you view source on the page you will not see a width in the article tag, but if you use firebug to look at the styles you will see: 如果您在页面上查看源代码,则不会在article标签中看到宽度,但是如果您使用firebug来查看样式,则会看到:
element.style { width: 565px; }
I've posted a sample version here: http://208.112.58.198/help/index_new.htm . 我在此处发布了示例版本: http : //208.112.58.198/help/index_new.htm 。
Your element's CSS width is being applied by the jquery plugin . 元素的CSS宽度由jquery插件应用 。
/help/wp-content/themes/Cobalt3/cobalt/js/main68b3.js
this file line number #339 has the following code. /help/wp-content/themes/Cobalt3/cobalt/js/main68b3.js
此文件行号#339具有以下代码。
$('#part-slideshow').carouFredSel({
height: 300,
width: '100%',
circular: true,
items: {
visible: 1,
height: 300,
},
scroll: {
items: 1,
fx: "crossfade",
duration: 1000,
easing: "swing"
},
auto: {
timeoutDuration: 5000,
delay: 5000,
pauseOnHover: true
},
pagination: '#pagination',
swipe: {
onTouch: true,
onMouse: true
},
responsive: true
});
The plugin binds a resize
event function to the carousel elements, which sets the element width responsive to the screen size because responsive: true
option is added in the call. 该插件将一个
resize
事件函数绑定到轮播元素,该函数根据屏幕尺寸设置元素宽度,因为在调用中添加了responsive: true
选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.