<pre name="code" class="css">
<pre code_snippet_id="371189" snippet_file_name="blog_20140531_1_3034260" name="code" class="html">CSS代码部分:
<pre name="code" class="css">p{ padding:5px; margin:0;}
input ,textarea{
padding:5px;
color:#999;
border-radius:3px;
border:1px solid #ccc;
}
/*为全局所有input组件添加边框发光效果*/
input[type=text]:focus,input[type=password]:focus,textarea:focus{
outline:none;
border-color:rgba(241,39,62,.75);
-webkit-box-shadow:0 0 8px rgba(241,39,52,.5);
-moz-box-shadow:0 0 8px rgba(241,39,52,.5);
-o-box-shadow:0 0 8px rgba(241,39,52,.5);
box-shadow:0 0 8px rgba(241,39,52,.5);
-webkit-transition:border linear .2s, -webkit-box-shadow linear .5s;
-moz-transition:border linear .2s, -moz-box-shadow linear .5s;
-o-transition: border linear .2s, -o-box-shadow linear .5s;
transition:border linear .2s, box-shadow linear .5s;
}
html代码部分:
<pre name="code" class="html"><p><input type="text" value="点击文本框会发光"></p>
<p><input type="password" name="" id="" value="密码框"></p>
<p><textarea name="" id="" cols="30" rows="10"></textarea></p>
效果预览图部分:
<img src="https://img-blog.youkuaiyun.com/20140531094930062?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMTE3NTQxMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" /><img src="https://img-blog.youkuaiyun.com/20140531094938812?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMTE3NTQxMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" /><img src="https://img-blog.youkuaiyun.com/20140531094952656?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdTAxMTE3NTQxMA==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />