Css图像查看器在单击时正在移动页面

Css图像查看器在单击时正在移动页面,css,image,viewer,Css,Image,Viewer,当我点击侧面的标签时,它会改变图片,这就是我想要它做的,但它也会移动页面,使视图位于顶部。我注意到只有当下面有页面内容时才会发生这种情况,这就是为什么在这个例子中我放了大量换行符 /* Setup Tabs */ #view ul{ margin-top: 0; background: black; width: 85px; /* Width of Tab Image */

当我点击侧面的标签时,它会改变图片,这就是我想要它做的,但它也会移动页面,使视图位于顶部。我注意到只有当下面有页面内容时才会发生这种情况,这就是为什么在这个例子中我放了大量换行符

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
如果你想更好地理解我的意思,这里有一个我的页面的链接:

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
dl.dropbox.com/u/8391091/Ebay%20page.html

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
我放在这里的代码只是图像查看器(css、html)的一部分

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
/*设置选项卡*/
#查看ul{
边际上限:0;
背景:黑色;
宽度:85px;/*选项卡图像的宽度*/
浮动:左;
列表样式:无;
右边框:8px纯色灰色;
}
#查看ulli{
左边距:-40px;
右边距:-40px;
高度:75px;/*选项卡图像的高度*/
}
/*设置选项卡,使正常不透明度为40,滚动为100*/
#查看ul LIA img{
边界:0px;
/*对于IE*/
-ms过滤器:“progid:DXImageTransform.Microsoft.Alpha(不透明度=40)”;
过滤器:α(不透明度=50);
/*CSS3标准*/
不透明度:0.5;
}
/*悬停时将不透明度更改为100%*/
#视图ul li a:悬停img{
/*对于IE*/
-ms过滤器:“progid:DXImageTransform.Microsoft.Alpha(不透明度=100)”;
过滤器:α(不透明度=100);
/*CSS3标准*/
不透明度:1.0;
}
/*将图像放置在选项卡的右侧,
并隐藏未选定的图像*/
#图像{
宽度:500px;
高度:300px;
溢出:隐藏;/*隐藏未选择的图像*/
浮动:左;
}
/*查看器周围的方形边框*/
#包装纸{
轮廓样式:无;
边框左上半径:5px 5px;
边框右上角半径:5px 5px;
边框左下半径:5px 5px;
边框右下半径:5px 5px;
-左上角moz边界半径:5px 5px;
-moz边界半径右上角:5px 5px;
-moz边框半径左下角:5px 5px;
-moz边框半径右下角:5px 5px;
宽度:633px;
高度:300px;
边框:10px纯灰;
保证金:0px自动;
}

(单击侧面的选项卡以查看更大的图片)

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>











更多网页内容































它使用片段标识符(在url:“#image1”中),这是默认行为。当您将这些标识符用于跳转链接时,它会将带有id的元素带到页面顶部的url中。现在要解决这个问题,我不确定,但我会立即尝试! 这个怎么样\ 您可以只做一个滚动,并有一个跨度与大图片改变它的可见性从隐藏到可见。这就是你通常的做法。你只需要稍微修改一下你的代码,让所有的大图片互相叠放,而不是用溢出隐藏起来

            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
a href="#viewer">
<img src="../Photo_Gallery/thumbs/pic1.jpg">
<span>
<img src="../Photo_Gallery/pic1.jpg">
<br>
   optional caption
</span>
</a>

这就是他们在教程中所做的。因此,不要像你那样将所有图片排成一行并使用overflow:hidden。将每个图片放在各自的缩略图下,然后将它们放置在彼此的上方隐藏。但问题是,按照它们的方式,页面加载时不会显示任何图片。所以我会设法解决这个问题

你知道修复它的代码吗?我的浏览器看起来会有什么不同吗?不知道。用户只需悬停,而不用点击图片。
            /* Setup Tabs */

            #view ul{

            margin-top: 0;
            background: black;
            width: 85px; /* Width of Tab Image */
            float: left;
            list-style: none;
            border-right:8px solid grey;
            }

            #view ul li{

            margin-left: -40px;
            margin-right: -40px;
            height:75px; /* Height of Tab Image */
            }

            /* Setup Tab so normal opacity is 40 and rollover is 100 */
            #view ul li a img{
            border: 0px;    
            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
            filter:alpha(opacity=50);

            /* CSS3 standard */
            opacity:0.5;

            }

            /* Change Opacity to 100% on hover*/
            #view ul li a:hover img{

            /* for IE */
            -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
            filter:alpha(opacity=100);

            /* CSS3 standard */
            opacity: 1.0;
            }

            /* Places images to the right of the tabs,
            and hides non selected images */
            #images{

            width: 500px; 
            height: 300px; 
            overflow: hidden;  /* Hides the non selected images */
            float: left;
            }

            /* Square border around viewer*/
            #wrapper{
            outline-style: none;
            border-top-left-radius: 5px 5px;
            border-top-right-radius: 5px 5px;
            border-bottom-left-radius: 5px 5px;
            border-bottom-right-radius: 5px 5px;
            -moz-border-radius-topleft: 5px 5px;
            -moz-border-radius-topright: 5px 5px;
            -moz-border-radius-bottomleft: 5px 5px;
            -moz-border-radius-bottomright: 5px 5px;
            width: 633px;
            height: 300px;
            border: 10px solid grey;
            margin: 0px auto;
            }
            </style>

            <div id="section1">
            <div id="view">
            <div id="wrapper">
            <!-- Tabs -->
            <ul>
            <li><a href="#image1" id="tab1"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="125" height="75"/></a></li>
            <li><a href="#image2" id="tab2"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="125" height="75"/></a></li>
            <li><a href="#image3" id="tab3"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="125" height="75"/></a></li>
            <li><a href="#image4" id="tab4"><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="125"           height="75"/></a></li>
            </ul>

            <!-- Images -->
            <div id="images">
            <div><a name="image1"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4095.jpg?t=1312893965" width="500" height="300" /></div>
            <div><a name="image2"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4093.png?t=1312894058" width="500" height="300" /></div>
            <div><a name="image3"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/IMG_4089.png?t=1312894246" width="500" height="300" /></div>
            <div><a name="image4"></a><img src="http://i1114.photobucket.com/albums/k536/outatimeoyster/Photo07-08-2011205730.jpg?t=1312894308" width="500" height="300" /></div>
            </div>
            </div>      
            </div>
            <p class="text" align="center">(Click tabs at side for larger picture)</p>      
            </div>

            </br>
            </br>
            </br>
            </br>
            </br>

            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            More page content
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>
            </br>