发表于: 2020-06-03 21:49:36

1 986


今天完成的事:

修改任务5

完成任务7


任务5背景会随页面缩放改变

            backgroundurl("./images/src/task5-1_01.png"no-repeat fixed;
            background-sizecover;
            displayflex;
            align-itemscenter;

使用fixed固定页面,flex布局文字样式


7-3游戏结果中的文字在缩放时第一行以下文字居中

设置一个新盒子duiqi包裹result,新盒子居中,result向右对齐

            .duiqi {
                text-aligncenter;

            }

            .result {
                displayinline-block;
                text-alignleft;
                font-size30px;
                margin0 5vw;
                color#ffc865;
            }

可以使文字达到以下效果

一行

多行


播放器部分使用flex替换相对定位达到更好的缩放效果,使用相对定位时页面缩放自适应会导致播放器下移

播放器父元素使用

                displayflex;

                justify-contentspace-between;

将播放器放到右边,文字放左边

                /* 
                position: absolute;
                top: 10.5vw;
                right: 2vw;
                 */


给最下面一排的设置

            .box1:last-child {
                margin-bottom10vw;
            }

使点击最下面盒子时不会因为隐藏元素出现而导致,布局改变


https://hejun12345.github.io/jnshu/css.%E4%BB%BB%E5%8A%A17-2.html

https://hejun12345.github.io/jnshu/css.%E4%BB%BB%E5%8A%A17-3.html


明天的计划:

做任务8


返回列表 返回列表
评论

    分享到