Adding Glow Effect to Input Boxes and Buttons
I'm in the middle of making my html form, and I want to add effects on it.
Is it possible for <input name="" type="text" class="" />
to have a glow effect?
Would it also be possible for the submit but开发者_运维技巧ton to have this effect as well?
This Works for all inputs of class Button
input.Button {
-moz-box-shadow: 0px 0px 10px Green;
-webkit-box-shadow: 0px 0px 10px Green;
box-shadow: 0px 0px 10px Green;
}
Per @Imoda
This works for all inputs of type text
input[type='text'] {
-moz-box-shadow: 0px 0px 4px #ffffff;
-webkit-box-shadow: 0px 0px 4px #ffffff;
box-shadow: 0px 0px 4px #ffffff;
}
And to get it only on hover:
input[type='text']:hover {
-moz-box-shadow: 0px 0px 4px #ffffff;
-webkit-box-shadow: 0px 0px 4px #ffffff;
box-shadow: 0px 0px 4px #ffffff;
}
You can create objects or artwork via Photoshop or Fireworks, then import that graphic into your development with your CSS file. Example:
div#btn {
background-position: top right;
position:absolute; */
margin:0px 0px; padding:0px;
text-align:center;
background-image: url(images/bg1.jpg);
background-repeat: no-repeat;
background-attachment:fixed;
}
Then in your HTML, just call that div on your button.
This will select your inputs that are the "text" type. Then change the #FFFFFF
to whatever colour you wish. In theory this should work. If it doesn't, add inset
directly after each colon. It's not an exact outer-glow
replication, but I believe it'll suit your needs.
input[type='text'] {
-moz-box-shadow: 0px 0px 4px #ffffff;
-webkit-box-shadow: 0px 0px 4px #ffffff;
box-shadow: 0px 0px 4px #ffffff;
}
精彩评论