使用DIV+CSS布局网页后,容器内的文字不可选择的解决方案,如无法选择DataList控件中的文字 

痛苦了很久搜到一个有效方法,很简单。

 加height:100%;就行,在css里面加也可以

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Linxz" />
<style type="text/css">
html, body {height:100%;}
div {
 position:absolute;
 top:100px;
 left:100px;
 width:200px;
 height:200px;
 border:1px solid red;
 }
</style>
<title>定位后无法选择容器的内容解决方案</title>
</head>

<body>
<div>
<a href="#">定位后无法选择容器的内容解决方案</a>
</div>
</body>
</html>