css美化iframe成浏览器ui效果

代码语言:html

所属分类:布局界面

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/reset.min.css">
<style>
.browser-template {
  height: 800px;
  overflow: hidden;
  border: 3px solid #dedede;
  border-top: none;
  border-radius: 8px;
}
.browser-template__top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  background: #dedede;
}
.browser-template__buttons {
  display: flex;
}
.browser-template__buttons_item {
  width: 10px;
  height: 10px;
  margin-left: 5px;
  border-radius: 100px;
  background: #c5c5c5;
}
.browser-template__buttons_item:first-child {
  margin-left: 0;
}
.browser-template__address {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
  height: 25px;
  margin: 0 15px;
  border-radius: 4px;
  background: #f8f8f8;
}
.browser-template__controls {
  display: flex;
}
.browser-template__controls_item {
  width: 12px;
  height: 12px;
  margin-left: 10px;
  color: #b8b8b8;
}
.browser-template__controls_item:first-child {
  margin-left: 0;
}

body {
  padding: 15px;
  background: #F7F8FB;
}

.browser-template {
  margin: 0 auto;
  max-width: 1200px;
  height: 95vh;
}

iframe {
  height: calc(100% - 45px);
}
</style>

</head>
<body translate="no">
<div class="browser-template">
<div class="browser-template__top-bar">
<ul class="browser-template__buttons">
<li class="browser-template__buttons_item"></li>
<li class="browser-template__buttons_item"></li>
<li class="browser-template__buttons_item"></li>
</ul>
<div class="browser-template__address">
</div>
<ul class="browser-template__controls">
<li class="browser-template__controls_item">
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0