Stránka 1 z 1

jak vytvořit button?

Napsal: 04 lis 2012 19:31
od vito85
Dobry den, na youtube jsem nasel jeden navod: http://www.youtube.com/watch?v=VRZ19fy5O08
Bohuzel nevim, jestli je tohle to prave nebo lze button vytvorit jednodussi cestou?
Podle toho navodu bude html kod vypadat takto:
Cely html kod by se mel vlozit napr. do prispevku nebo jak je to vlastne?

Kód: Vybrat vše

<!doctype html>
<html>
   <head>
      <meta charset="UTF-8" />
      <title>My Button</title>
      <style type="text/css">
         body {
            padding: 5px;
         }
         a.button {
            padding: 8px 16px;
            color: white;
            text-decoration: none;
            font-family: Arial;
            font-weight: bold;
            background-color: #6B90C6;
            border: 1px solid #3366CC;
            background-image: -webkit-gradient(
                linear,
                left bottom,
                left top,
                color-stop(0, rgb(26,71,162)),
                color-stop(0.73, rgb(107,143,198))
            );
            background-image: -moz-linear-gradient(
                center bottom,
                rgb(26,71,162) 0%,
                rgb(107,143,198) 73%
            );
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            border-radius: 5px;
         }
         a.button:hover {
            background-image: -webkit-gradient(
                linear,
                left bottom,
                left top,
                color-stop(0, rgb(26,71,162)),
                color-stop(0.84, rgb(143,177,227))
            );
            background-image: -moz-linear-gradient(
                center bottom,
                rgb(26,71,162) 0%,
                rgb(143,177,227) 84%
            );
         }
      </style>
   </head>
   <body>
      <a class="button" href="#">Create Account &rsaquo;</a>
      <a class="button" href="#">Sign In</a>
   </body>
</html>

Re: jak vytvořit button?

Napsal: 05 lis 2012 12:23
od PetrHrd
Button jde vytvořit jednodušší cestou, ale tobě bych doporučil nějaký nástroj, resp. button creator, který ti pomůže. Jeden najdeš treba na

Kód: Vybrat vše

http://www.cssbuttongenerator.com/

ale pomocí google jich najdeš víc.

Celý tento html kod vložiš do stránky, je ovšem lepší vkládat kaskádové styly do externího souboru.