Skip to content

复杂的背景图案实践中的疑问 #83

@Southhill

Description

@Southhill

你好,我在实践复杂的背景图案时出现一个疑问:
按作者的案例代码写棋盘背景,小方格不能均分容器宽高。代码如下:

width: 300px;
 height: 300px;
background: #58a;
 background-image: linear-gradient(90deg, white 1px, transparent 0),
                              linear-gradient(white 1px, transparent 0);
background-size: 30px;

显示效果:
异常的显示
如果我把background-size,width,height的值调整为40px,400px,则不会有显示异常。
显示效果:
snipaste_2017-10-01_13-19-36

我不清楚我的代码哪里出问题了,恳请解答一下。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions