Javascript 在屏幕中间点击可点击的内容

Javascript 在屏幕中间点击可点击的内容,javascript,jquery,html,css,Javascript,Jquery,Html,Css,我想把jQuery图像,使其可点击,其在页面内容的所有时间-正是我在屏幕中间。这是一面旗帜。 我尝试了以下代码: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>jQuery UI Dialog - Basic modal</title> <link rel="stylesheet" href="htt

我想把jQuery图像,使其可点击,其在页面内容的所有时间-正是我在屏幕中间。这是一面旗帜。 我尝试了以下代码:

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>jQuery UI Dialog - Basic modal</title>
  <link rel="stylesheet"     href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <script>
  $(function() {
    $( "#dialog-modal" ).dialog({
      height: 140,
      modal: true
    });
  });
  </script>
</head>
<body>

<div id="dialog-modal" title="Basic modal dialog">
  <p>Adding the modal overlay screen makes the dialog look more prominent because it                     dims out the page content.</p>
</div>

<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec     aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus     aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>

jQuery UI对话框-基本模式
$(函数(){
$(“#对话框模式”).dialog({
身高:140,
莫代尔:对
});
});
添加模式覆盖屏幕使对话框看起来更加突出,因为它使页面内容变暗

我是自由人。Donec aliquet leo vel magna。红背相思。埃蒂安·比本杜姆、埃尼·福西布斯·阿利奎特·朗库斯、阿尔库·菲利斯·乌尔里西斯·内克、艾米特·拍卖行精英爱神之座

它所做的是使图像,但位置是屏幕的中心-如果页面有滚动,东西在1点保持静止-而不是任何屏幕的中心

有什么帮助吗(

不使用CSS似乎可以正常工作。我认为您的CSS文件包含
位置:已修复;
尝试删除此元素。这样它就不会挂在屏幕上。希望有帮助