Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
  <!DOCTYPE html>
<html ng-app="com.ngbook.demo">
<head>
<meta name="description" content="em % demo">
</head>
<body >
    <div class="parent">
      <div class="em-demo">
          设置长度为5em demo
      </div>
        <div class="percentage-demo">
          设置长度为80% demo
        </div>
    </div>
</body>
</html>
 
div{
    border: 1px dashed #808080;
    margin:10px
}
.parent{
    width: 200px;
    font-size: 18px;
}
.em-demo{
    width: 5em;
}
.percentage-demo{
    width: 80%
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers