背景尺寸:封面;我们可以反转剪辑方向吗?

时间:2016-06-15 23:14:47

标签: html css css3 carousel

CSS3规则' background-size:cover;'从div的左上角开始,以纵横比拉伸背景图像,以便动态覆盖div的宽度。

对于我所拥有的特定图像,如果'背景大小:覆盖;'从div的左下角开始图像(div具有固定的高度)并向右和向上覆盖。这样,图像的天空就不会是宽屏显示器上唯一可见的东西。

经过一些试验和研究,我已经空了。这可能吗?

谢谢

1 个答案:

答案 0 :(得分:2)

是的,使用职位Traceback (most recent call last): File "/Users/SM/PycharmProjects/zendesk/zendesk_tickets_api.py", line 102, in main cleaned_data = json.loads(encoded_data) File "/Users/SM/anaconda/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/Users/SM/anaconda/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Users/SM/anaconda/lib/python2.7/json/decoder.py", line 380, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Invalid \escape: line 1 column 2826494 (char 2826493) |********************************************************| Invalid \escape: line 1 column 2826494 (char 2826493) well described at MDN



bottom left

div {
  height: 300px;
  background: url('http://lorempixel.com/500/500/nature/4') no-repeat bottom left;
  background-size: cover;
}




使用默认的<div></div>

看起来像这样

&#13;
&#13;
top left
&#13;
div {
  height: 300px;
  background: url('http://lorempixel.com/500/500/nature/4') no-repeat top left;
  background-size: cover;
}
&#13;
&#13;
&#13;