jquery图像上传预览效果
代码语言:html
所属分类:上传
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.css"> <style> body { background: whitesmoke; font-family: 'Open Sans', sans-serif; } .container { max-width: 960px; margin: 30px auto; padding: 20px; } h1 { font-size: 20px; text-align: center; margin: 20px 0 20px; } h1 small { display: block; font-size: 15px; padding-top: 8px; color: gray; } .avatar-upload { position: relative; max-width: 205px; margin: 50px auto; } .avatar-upload .avatar-edit { position: absolute; right: 12px; z-index: 1; top: 10px; } .avatar-upload .avatar-edit input { display: none; } .avatar-upload .avatar-edit input + label { display: inline-block; width: 34px; height: 34px; margin-bottom: 0; border-radius: 100%; background: #FFFFFF; border: 1px solid transparent; box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12); cursor: pointer; font-weight: normal; transition: all 0.2s ease-in-out; } .avatar-upload .avatar-edit input + label:hover { background: #f1f1f1; border-color: #d6d6d6; } .avatar-upload .avatar-edit input + label:after { content: "\f040"; font-family: 'FontAwesome'; color: #757575; position: absolute; top: 10px; left: 0; right: 0; text-align: center; margin: auto; } .avatar-upload .avatar-preview { width: 192px; height: 192px; position: relative; border-radius: 100%; border: 6px solid #F8F8F8; box-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0