我有一个javascript,当你点击图像时它会改变图像scr,它将循环通过.它还有箭头键盘导航的分页链接.我想要做的是添加一个选择下拉列表框,允许我跳转到我想要的任何图像.我怎样才能做到这一点?我只想要一个没有提交按钮的选择下拉列表
/* set first image in frame from #shoebox on document.ready */
$(function() {
var leadOff = $('#shoebox img:first-child').attr('source');
$('.picture').attr({'src' : leadOff, 'imageposition' : '1'});
});
/* load next image from #shoebox (click on image and/or next button) */
$('#pictureframe, #buttonright').click(function() {
var imageTally = $('#shoebox img').length;
var imagePosition = $('.picture').attr('imageposition');
var plusOne = parseInt(imagePosition) + 1;
var nextUp = $('#shoebox img:nth-child(' + plusOne + ')').attr('source');
if (imagePosition == imageTally) {
var leadOff = $('#shoebox img:first-child').attr('source');
$('.picture').attr({'src' : leadOff, 'imageposition' …Run Code Online (Sandbox Code Playgroud)如何将#box div垂直居中在页面中心?我试过vertical-align:middle; 但它不起作用.你可以在这里查看网站
这是css:
iframe {
position: fixed;
width: 100vw;
height: 100vh;
border: none;
margin: 0;
padding: 0;
overflow: hidden;
z-index: 999999;
}
body {
background-color: #000;
}
#box {
text-align: center;
vertical-align: middle;
}
#link {
color: #FFF;
}
#download {
color: #FFF;
}
Run Code Online (Sandbox Code Playgroud)