列表

详情


FED15. 固定定位

描述

请将html模块类为"box"的div元素固定在视口的左上角。

原站题解

HTML/CSS/JavaScript 解法, 执行用时: 1687ms, 内存消耗: 77876KB, 提交时间: 2022-02-09

{"css":"","js":"","html":"<html>\n    <head>\n        <meta charset=utf-8>\n        <style type=\"text/css\">\n            .box {\n                width: 100px;\n                height: 100px;\n                /*补全代码*/\n                border:1px solid black;\n                position:fixed;\n                left:0;\n                top:0;\n            }\n        </style>\n    </head>\n    <body>\n        <div class='box'></div>\n    </body>\n</html>","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1689ms, 内存消耗: 77824KB, 提交时间: 2022-02-08

{"css":"","js":"","html":"<html>\n    <head>\n        <meta charset=utf-8>\n        <style type=\"text/css\">\n            .box {\n                width: 100px;\n                height: 100px;\n                position: fixed;\n                top: 0;\n                left: 0;\n                /*补全代码*/\n                \n                \n            }\n        </style>\n    </head>\n    <body>\n        <div class='box'></div>\n    </body>\n</html>","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1744ms, 内存消耗: 77848KB, 提交时间: 2021-11-21

{"css":"","js":"","html":"<html>\n    <head>\n        <meta charset=utf-8>\n        <style type=\"text/css\">\n            .box {\n                width: 100px;\n                height: 100px;\n                position: fixed;\n                left: 0px;\n                top: 0px;\n                /*补全代码*/\n                \n            }\n        </style>\n    </head>\n    <body>\n        <div class='box'></div>\n    </body>\n</html>","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1747ms, 内存消耗: 77900KB, 提交时间: 2022-01-22

{"css":"","js":"","html":"<html>\n    <head>\n        <meta charset=utf-8>\n        <style type=\"text/css\">\n            .box {\n                width: 100px;\n                height: 100px;\n                /*补全代码*/\n                position: fixed;\n                top:0;\n                left:0;\n                background-color: yellow;\n            }\n        </style>\n    </head>\n    <body>\n        <div class='box'></div>\n    </body>\n</html>","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 1747ms, 内存消耗: 77900KB, 提交时间: 2021-12-06

{"css":"","js":"","html":"<html>\n    <head>\n        <meta charset=utf-8>\n        <style type=\"text/css\">\n            .box {\n                width: 100px;\n                height: 100px;\n                /*补全代码*/\n                background-color:red;\n                position:fixed;\n                top:0;\n                left:0;\n                \n            }\n        </style>\n    </head>\n    <body>\n        <div class='box'></div>\n    </body>\n</html>","libs":[]}

上一题