Hello i'm css begginer and i have problems with my application html page. I'm writing app and i want to create login view where login forms appears after voice command or button click. i have 2 problems i cant center my form (on jsbin this css works fine :D) and my target event (animation) runs after page is ready not after link click. this is my css:
#przejscie
{
width: 340px;
display: block;
opacity: 0;
max-width: 100%;
margin: 0 auto;
position: relative;
top: 500px;
transition: transform 20s, background 50s;
-o-transition: -o-transform 16s, background 0.5s;
-moz-transition: -moz-transform 0.5s, background 0.5s;
-webkit-transition: -webkit-transform 3s, opacity 2s, background 0.5s;
}
#przejscie:target
{
transform: translate(-200);
-o-transform: scale(1.2);
-moz-transform: scale(1.2);
-webkit-transform: translate(0px,-300px );
opacity: 1;
}
and my form:
<html>
<head>
<script src="{% static 'js/artyom.min.js' %}"></script>
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="{% static 'css/animacje.css' %}"/>
</head>
<h1><a href="#przejscie">Welcome register in our application</a></h1>
<div id="przejscie" class="container col-sm-3 srodek col-md-offset-2">
<form method="post" action="/PPProject-web/register" class="form-signin">
<label for="email" class="sr-only">Adres e-mail</label>
<input name="email" class="form-control" id="email" type="email" placeholder="E-mail" required>
<label for="imie" class="sr-only">Imię</label>
<input name="imie" class="form-control" id="imie" placeholder="Imię" required>
<label for="nazwisko" class="sr-only">Adres e-mail</label>
<input name="nazwisko" class="form-control" id="nazwisko" placeholder="Nazwisko" required>
<label for="username" class="sr-only">Nazwa użytkownika</label>
<input name="username" class="form-control" id="username" placeholder="Nazwa użytkownika" required>
<label for="password" class="sr-only">Adres e-mail</label>
<input name="password" type="password" class="form-control" id="password" placeholder="Hasło" required>
<button class="btn btn-lg btn-primary btn-block" type="submit">Zarejestruj się</button>
</form>
</div>
</html>
ok target works fine but still can't center this div.