body{
font-family: Open Sans, Arial;
}
input{
padding: 10px;
width: 350px;
color: #000;
}
/* Forma 1
* utilizando unicode no placeholder
*/
input#forma_1{
font-family: "FontAwesome";
}
/* Forma 2
* utilizando unicode no placeholder
*/
input#forma_2{
/* aqui você define o tamanho da fonte */
font-size: 14px;
/*
se constar somente FontAwesome em font-family, aparece o ícone, porém o texto
"informe seu e-mail" fica com a fonte padrão do navegador
font-family: "FontAwesome";
*/
/* fazendo dessa forma aparece o ícone e a fonte do texto é formatado */
/* atenção: pra variar o ieka (i.e.) não funciona direito - mantém a fonte padrão */
font-family: "FontAwesome", Open Sans, Arial;
/* aqui você define a cor */
color: #3d3d3d;
}
/*
* utilizando position + before
*/
#email {
padding-left: 30px;
width: 330px;
color: #ff0000;
}
#email-label {
position: relative;
}
#email-label:before {
color: #ff0000;
content:"\f003";
font-family: FontAwesome;
position: absolute;
top: 2px;
left: 10px;
}
/* Forma 3
* utilizando unicode no value
*/
input#enviar{
/* aqui você define o tamanho da fonte */
font-size: 18px;
/*
se constar somente FontAwesome em font-family aparece o ícone porém o texto
"informe seu e-mail" fica com a fonte padrão do navegador
font-family: "FontAwesome";
*/
/* fazendo dessa forma aparece o ícone e o texto fica formatado */
font-family: "FontAwesome", Open Sans, Arial;
/* aqui você define a cor */
color: #FFF;
/* definindo outros atributos */
background-color: #00a0c4;
border: 1px solid #00a0c4;
border-radius: 4px;
width: 150px;
cursor: pointer;
}
/*
* utilizando class + position
*/
#box_icone_busca{
width: 30px;
height: 30px;
padding: 10px;
position: relative;
left: -39px;
top: 1px;
}
#icone_busca {
color: #000;
cursor: pointer;
}
JavaScript
function sua_funcao_aqui(){
alert("cliquei aqui!");
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.