wordpress登录界面样式优化
效果
引入样式表
functions.php
function login_scripts() { wp_enqueue_style( "login-index", get_template_directory_uri() . "/style/login.css" ); } add_action('login_enqueue_scripts', 'login_scripts');
样式
less
.login { position: relative; background-image: url("https://img.yzb123.top/wp-bj.jpg"); background-position: center; background-size: cover; } #login { position: absolute; left: 50%; margin-left: -200px; padding: 0; top: 50%; margin-top: -300px; background: #fff; width: 400px; border-radius: 4px; h1 { padding: 30px 0; a { background-image: url("https://img.yzb123.top/1.png"); border-radius: 50px; box-shadow: 0 0 10px 5px #e4eaef; background-size: 80% auto; background-position: center; margin: 0 auto; width: 80px; outline: none; height: 80px; transition: all .2s; &:hover { box-shadow: 0 0 10px 5px #bfd9ef } } } form { box-shadow: none; margin-top: 0; padding: 10px 30px 2px; input { padding: 7px 10px; margin-top: 8px; font-size: 16px; border-radius: 4px; height: 40px; &:focus { border-color: #419df5; box-shadow: 0 0 2px rgb(123, 184, 243); } } .forgetmenot { padding-bottom: 20px; padding-top: 7px; input[type=checkbox], input[type=radio] { width: 20px; height: 20px; margin-top: 0 } } .submit { float: none; input[type=submit] { width: 100%; background: #419df5; border-color: #419df5; line-height: 40px; padding: 0; text-shadow: none; box-shadow: none } } } #nav, #backtoblog { padding-left: 30px } } @media screen and (max-width: 767px) { #login { left: 5%; margin-left: 0; width: 90% } }
效果预览
相关推荐
Wordpress0 2020-09-27
bluehost 2020-09-15
maccarty 2020-08-03
86520993 2020-07-28
WordPress 2020-07-04
李维山 2020-06-21
GimmeS 2020-06-14
WordPress 2020-06-10
shayuchaor 2020-06-10
liwf 2020-06-02
疯狂老司机 2020-05-26
zcl 2020-05-12
timewind 2020-05-11
86520993 2020-05-04
Lophole 2020-04-29
fraternityjava 2020-04-23
84911835 2020-04-16
maccarty 2020-04-09
WordPress 2020-04-07