【发布时间】:2017-05-07 01:10:01
【问题描述】:
我正在尝试使用这个渐变:
background: rgba(0, 0, 0, 0) linear-gradient(45deg, rgba(204, 202, 204, 1) 0%, rgba(204, 202, 204, 1) 11%, rgba(252, 252, 252, 1) 45%, rgba(252, 252, 252, 1) 53%, rgba(214, 212, 214, 1) 81%, rgba(204, 202, 204, 1) 88%) repeat scroll 0 0;
还有这张图片:
background-image: url('./wp-content/uploads/2016/12/opt_tree_only.png');
background-size: contain;
background-repeat: no-repeat;
background-position: 10% 25%;
结合在一起,但是我没有这样做,因为它要么显示渐变,要么显示图像,永远不会同时显示两者。我对 CSS 的工作不多,因此我没有更多的想法来实现它。
【问题讨论】:
标签: css image background header gradient