开发者

Horizontal scrollbar for images in html

开发者 https://www.devze.com 2023-01-18 05:59 出处:网络
I am developing a web-site for mobile 开发者_运维百科and i-pod in HTML. I would like a horizontal scroll bar for multiple images in one row, which has a hyper link.

I am developing a web-site for mobile 开发者_运维百科and i-pod in HTML. I would like a horizontal scroll bar for multiple images in one row, which has a hyper link.

What is easiest method for this?

Thanks in advance for your help.


This example has inline styles, please put all your style rules into a stylesheet when you actually use this code.

Here is an example of the HTML you need...

<div style="width: 500px; height: 120px; overflow: auto;">
    <div style="width: 1000px; height: 120px">
        <ul style="padding: 0;">
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
            <li style="display: inline;"><img src="image.png" alt="My Image"></li>
        </ul>
    </div>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号