db c .button с кодом html - вся кнопка не нажимается - PullRequest
0 голосов
/ 16 июня 2020

Я пытаюсь создать веб-сайт с Da sh для python, используя компоненты da sh bootstrap (db c). У меня есть кнопки db c. Внутри jumbotron и в них встроен текст html. Я не могу увеличить интерактивную область, чтобы покрыть всю кнопку. Я изменил white_link на display: block, и это значительно увеличило его, но это все еще не вся кнопка. Вот мой код, а также соответствующий код css. Любая помощь приветствуется.

  html.Div(),
        dbc.Jumbotron(
            [
                html.H1("Ontario", className="display-3"),
                dcc.Markdown (['''hello-world'''], className = "lead"),
                html.Hr(className="my-2"),
                html.P(
                    "testcode"
                ),
                html.Div(
                    [
                        dbc.Button(html.A("A", href = "#core", className = "white_link"), color="success",style = {'margin-right':'5px'}, size = "lg", id="core"),
                        dbc.Tooltip("A-hello", target="A", placement="bottom"),
                        dbc.Button(html.A("B", href = "#tool", className = "white_link"), color="primary",style = {'margin-left':'5px'}, size = "lg", id="tool"),
                        dbc.Tooltip("B-hello", target="", placement="bottom"),
                    ], className = "jumbo-buttons"),
            ], 
        ),
        html.Div()

* Jumbotron Stuff */
.jumbotron {
    opacity: 0.85;
    margin-bottom: 0px;
    padding: 64px 42px;
    height: max-content;
}

.jumbotron.logon h6 {
  font-weight: 600;
}

.jumbo-buttons {
    display: grid;
    grid-template-columns: 50% 50%; 
}


/* Top Margin for pages */
.margin-up {
    margin-top: 125px;
}


/* Links in Misc Buttons */
.white_link {
    color: #ffffff;
    transition: all 0.3s linear;
    display: block;
}

.white_link:hover {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...