高亮旁边的右侧边栏

时间:2017-05-14 11:23:06

标签: html css sidebar

我想在右侧的高光图像旁边添加侧边栏。

我怎么能得到这个?

我尝试过很多东西但却无法让它工作。 Float不起作用,因为高光图像浮出布局。

代码:

HTML:

.wrapper div {
  display: inline-table;
  }

/* Large image */
.big-one {
  float: left;
  text-align: center;
  color: white;
  font-size: 24px;
  width: 70%;
  height: 300px;
  background-image: url('http://private.teunstrik.com/blog/wp-content/uploads/2017/05/Schermafbeelding-2017-05-13-om-16.46.11-1024x498.png'); 
   background-size: cover;
}

/* Small image */
.small-one {
  text-align: center;
  color:white;
  width: 30%;
  height: 150px;
  background-image: url('http://private.teunstrik.com/blog/wp-content/uploads/2017/05/Schermafbeelding-2017-05-13-om-16.48.31-1024x539.png');
  background-size: cover; 
}

/* Small image */
.small-two {
  text-align: center;
  color:white;
  width: 30%;
  height: 150px;
  background-image: url('http://private.teunstrik.com/blog/wp-content/uploads/2017/05/Schermafbeelding-2017-05-13-om-16.58.38-1024x577.png'); 
  background-size: cover;
}

CSS:

.wrapper {
    margin: 0 auto;
    padding-top: 64px;
    max-width: 940px;
    width: 94%;
    float:left;
}

#sidebar {
  float:right;
  padding:5px;
}

我尝试过的事情是这样的:

let image = UIImage(data: imageData, scale: UIScreen.main.scale)

但是这样打印出来的是:http://private.teunstrik.com/blog/wp-content/uploads/2017/05/Schermafbeelding-2017-05-14-om-13.32.25-1024x325.png

由于

0 个答案:

没有答案