我有一个网页,在22英寸的显示器上看起来不错,但在笔记本电脑上看起来很糟糕......我想知道是否有可能使所有类型的尺寸都可调整屏幕...我已经tryed在JS表函数,在CSS宽度100%......我需要一些帮助:(继承人小提琴:http://jsfiddle.net/ygaw2/43/和一些代码:根据屏幕分辨率自动调整大小的网页
function submit()
{
var dropspot_elements = document.getElementById("dropspot").children;
var dropspot_stringOfElementIDs =[];
for(var i = 0; i < dropspot_elements.length; i++)
{
dropspot_stringOfElementIDs.push(dropspot_elements[i].id);
}
if(dropspot_stringOfElementIDs.join("")===document.getElementById("container").children[imgNumber-1].id )
{
if(imgNumber < 5)
alert('CORECT! Puteți trece la secvența următoare.');
else
alert('Felicitări,ați ghicit toate răspunsurile.Jocul a luat sfârșit!');
levelDone = true;
}
else
{
if(dropspot_stringOfElementIDs.length===0){
alert('Nu ați incercat nici un răspuns.Trageți litere pentru a forma cuvântul ce reprezintă imaginea.');
}
else
alert('GRESIT! Încercați din nou.');
$("#dropspot").empty();
}
}
我认为这是无关紧要JavaScript,但一招鲜“技术”称为响应式设计的。 –