Skip to content

02 - JS + CSS Clock 细节 布局问题 #55

@xiaolannuoyi

Description

@xiaolannuoyi
.clock-face {
        position: relative;
        width: 100%;
        height: 100%;
        transform: translateY(-3px); /* account for the height of the clock hands */
}

transform: translateY(-3px); 应该删除,此处是hand指针高度为6px时,使其居中
而你的分别为时分秒设定不同的高度,并通过margin-top:-height/2 使其居中了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions