CSS中如何实现分屏,或者点开一个网页时打开两个网页

html-css07

CSS中如何实现分屏,或者点开一个网页时打开两个网页,第1张

css不行,使用JavaScript的open方法即可

<!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/htmlcharset=utf-8" />

<title>无标题文档</title>

<script type="text/javascript">

function change(){

var sw=window.screen.width

var sh=window.screen.height

window.open('http://www.google.com','newWin1','width='+sw/2+',height='+sh+',screenX=0,screenY=0')

window.open('http://www.baidu.com','newWin2','width='+sw/2+',height='+sh+',screenX='+sw/2+',screenY=0')

}

</script>

</head>

<body>

<a href="###" onclick="change()">ddddd</a>

</body>

</html>

你好。Alt + Shift + 2 将视图设置成两列;打开一个css文件,Ctrl + Shift + 2,将其“赶”到右边那列。如果在sublime 里面这两个组合键都没反应啊那你从菜单栏选取吧:View - Layout - Columns 2View - Move File to Group - Group 2我的回答没能帮助您,你可以继续追问。