CSS共42篇 第3页

css中的flex(弹性)布局,并排显示

css中的flex(弹性)布局,并排显示-雪哥尔
1、flex-direction 此属性决定主轴的方向 .flex{ flex-direction: row; // (默认值) 主轴水平方向,从左往右 如图: flex-direction: row-reverse; // 主轴水平方向的逆方向,从右往左 flex-dir...
2年前
018911

CSS hover按钮背景色渐变

CSS hover按钮背景色渐变-雪哥尔
自定义鼠标hover按钮时,botton的背景颜色渐变效果 <!DOCTYPE html> <html lang='en'> <head> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> &...
2年前
026013

响应式居中-在整个屏幕最中间的位置

响应式居中-在整个屏幕最中间的位置-雪哥尔
方法一:具有固定定位的屏幕居中 .XulgrCenter{ position: fixed; top: 0; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; justify-content: cen...
2年前
02576

CSS悬浮固定效果

CSS悬浮固定效果-雪哥尔
<style> /*设置了高度,可以上下滚动*/ body { height: 1800px; background:#dddddd; } /*div通用样式*/ div{ background: #1a59b7; color:#ffffff; overflow: hidden; z-index: 9999; po...
4年前
08580

CSS居屏幕正中

CSS居屏幕正中-雪哥尔
<style> body{ background-color:#000; } .xulgr-table{ width:100%; height:100%; border:0; text-align:center; cellpadding:0; cellspacing:0; }.xulgr-table td{ text-align:center; ...
4年前
07490

几个简单的搜索框

几个简单的搜索框-雪哥尔
<style> * { box-sizing:border-box; } body { margin:0; padding:0; background-image:url(ydrzimages/p3.jpg); font-weight:500; font-family:'Microsoft YaHei','宋体','Segoe UI','Lu...
4年前
010580

CSS对象图片

CSS对象图片-雪哥尔
width: 80px;height: 80px; /*对象宽高*/ background-image: url(https://imgs.xulgr.com/xg800.png); /*图片路径*/ background-size:80px 80px; /*调整background-image图片大小*/ background-...
4年前
07090

使用js点击复制按钮将textarea框隐藏

使用js点击复制按钮将textarea框隐藏-雪哥尔
完整代码 <style> #xulgr-bzm-input{ position:absolute; top:-9999px; left:-9999px; } </style> <p id='xulgr-bzm-text'>被复制的内容</p> <textarea id='xulgr-b...
4年前
011150

阴影颜色渐变圆角边框

阴影颜色渐变圆角边框-雪哥尔
上次我说的边框颜色渐变有个缺陷就是不能控制圆角,今天写个阴影颜色渐变圆角边框   实例代码: <style> .xulgr-input{margin:40px;} .xulgr-input2{margin:40px;} .xulgr-input{ po...
4年前
06630

CSS用图片作为文字的背景

CSS用图片作为文字的背景-雪哥尔
  background:url(图片路径); background-attachment: fixed; background-size: cover; -webkit-text-fill-color:transparent; -webkit-background-clip: text; 运行代码 $('#302').on('cl...
4年前
04890