小编and*_*pka的帖子

Python键入模块类型

我使用importlib.import_module如下动态加载Python模块

    def load_module(mod_name: str) -> ???:
        return importlib.import_module(mod_name)
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我模块类型的正确类型注释是什么.该typing模块不包含一个,我在其他地方找不到答案.

python typing python-typing

15
推荐指数
1
解决办法
1542
查看次数

全高可滚动侧边栏

我目前正在编写一个 Angular 应用程序,它有一个顶部固定的引导程序导航栏和一个侧边栏容器,其中包含一个侧边栏标题和一个显示一些内容的可滚动侧边栏列表。

因此,我使用以下 CSS 类:

.main-wrapper {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    padding-top: 50px;
}

.sidebar-container {
    height: 100%;
    position: fixed;
    padding: 0px;
    margin-top: -50px;
    padding-top: 50px;
    border-right: 1px solid #ddd;
}

.sidebar-header {
    position: relative;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.sidebar {
    height: 100%;
    position: relative;
    overflow-y: scroll;
}
Run Code Online (Sandbox Code Playgroud)

以及以下 html 代码:

<div class="main-wrapper">      
    <div class="sidebar-container col-xs-3">
        <div class="sidebar-header">
            ...
        </div>
        <div class="sidebar">
            ...
        </div>
    </div>
    <div class="main-view col-xs-9 pull-right">
        ... …
Run Code Online (Sandbox Code Playgroud)

html css sidebar navbar twitter-bootstrap-3

7
推荐指数
1
解决办法
1万
查看次数