Ask for basic questions about page design_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:06:56
Original
931 people have browsed it

I don’t know if this post should be posted here. I posted it once last time and no one answered it :(

I would like to ask two questions from page design experts:

1. How to make a slideshow? The pictures are placed on the background. Specifically, some photos are displayed in the background in a certain time order. The foreground is the title or other

2. How to put a scrolling news strip, that is, a piece of news slowly moves from left to right, and then again Repeat

Do these functions have to be available in paid software? I now have Microsoft expression web 4 and free Komposer available

Thank you all in advance


Reply to the discussion (solution)

Both of these functions can be achieved through JS.
The first effect is achieved by regularly changing the background image
<.>

// 假设有个<div id="changebg"></div>var imgs = new Array();var index = 0;function InitBgImgs() {    // 设定背景图片集}function ChangeBg() {    $("#changebg").css({ "background-image": "url(" + imgs[index] + ")" });    if (++index > imgs.length) { index = 0; }    setTimeout("ChangeBg()", 1000); // 每秒更换背景一次}
Copy after login

The second method is to place a floating DIV on the page, and then move the display from left to right or from right to left. The implementation method is similar to the above, except that the STYLE controlled is different from the left. Control LEFT from right to left, control RIGHT from right to left

The poster can google the JS slideshow plug-in

Use js to implement image carousel

The function is setTimeout

Thank you Everyone’s help, sorry for the late reply

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template