`
angowang
  • 浏览: 5132 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论

两个按钮将屏幕对半,且适应屏幕的缩放

    博客分类:
  • css
 
阅读更多

例子:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title>Test</title>

<style type="text/css">

body{

margin: 0px;

padding: 5px;

}

.box {

text-align: center;

}

.left {

display: inline-block;

width: 49.5%;

margin-right: 0.5%;

border: 1px solid rgba(127, 127, 127, 0.6);

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

.right {

display: inline-block;

width: 49.5%;

margin-left: 0.5%;

border: 1px solid rgba(127, 127, 127, 0.6);

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

</style>

</head>

<body>

<div class="box">

<div class="left">left</div><div class="right">right</div>

</div>

</body>

</html>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics