Button calling page

Asked

Viewed 42 times

0

Where in my css code I add an on.click to call href to another page

.meubotao {
    -moz-box-shadow: 0px 1px 0px 0px #000000;
    -webkit-box-shadow: 0px 1px 0px 0px #000000;
    box-shadow: 0px 1px 0px 0px #000000;
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffec64), color-stop(1, #ffab23));
    background:-moz-linear-gradient(top, #ffec64 5%, #ffab23 100%);
    background:-webkit-linear-gradient(top, #ffec64 5%, #ffab23 100%);
    background:-o-linear-gradient(top, #ffec64 5%, #ffab23 100%);
    background:-ms-linear-gradient(top, #ffec64 5%, #ffab23 100%);
    background:linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffec64', endColorstr='#ffab23',GradientType=0);
    background-color:#ffec64;
    -moz-border-radius:15px;
    -webkit-border-radius:15px;
    border-radius:15px;
    border:3px solid #000000;
    display:inline-block;
    cursor:pointer;
    color:#333333;
    font-family:Georgia;
    font-size:28px;
    font-weight:bold;
    padding:20px 50px;
    text-decoration:none;
    text-shadow:0px 1px 0px #ffffff;
    position:absolute;
        top: 500px;
        left: 700px;
}
.meubotao:hover {
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffab23), color-stop(1, #ffec64));
    background:-moz-linear-gradient(top, #ffab23 5%, #ffec64 100%);
    background:-webkit-linear-gradient(top, #ffab23 5%, #ffec64 100%);
    background:-o-linear-gradient(top, #ffab23 5%, #ffec64 100%);
    background:-ms-linear-gradient(top, #ffab23 5%, #ffec64 100%);
    background:linear-gradient(to bottom, #ffab23 5%, #ffec64 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffab23', endColorstr='#ffec64',GradientType=0);
    background-color:#ffab23;
}
.meubotao:active {
        position:absolute;
        top: 500px;
        left: 700px;
}

html

<a href="#" class="meubotao">INICIAR TESTE</a>
  • Nowhere in CSS. Either you use JS or HTML itself.

  • CSS does not treat events in the DOM and what you mean by "calling href to another page"?

  • onClick="Location. href= ... in html only?

  • 1

    <a href="suapagina.html" class="meubotao">INICIAR TESTE</a>?

  • good, thanks man...

1 answer

0


<style type="text/css">
.botão a {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;      
}

</style>

<div class="botão">
    <a href="/questions/220572/bot%C3%A3o-chamando-pagina#">Página tal</a>
</div>

There are several ways,s this top is one of them. But I think there is no way to call page by CSS even because that is not the function of language.

I did some research here and found two links that might be of interest to you:

https://stackoverflow.com/questions/3859101/what-does-ahref-do-in-css

http://css3buttongenerator.com/

the first is a question in the stack, with great answers, you can get what I said about the CSS function with href.

the second is a tool that generates button in css, has as you edit everything there.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.