jquery实现文字拖拽左右溢出效果代码
代码语言:html
所属分类:拖放
代码描述:jquery实现文字拖拽左右溢出效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro); html { font-size: 10px; } body { background: thistle; margin: 0; font-family: Source Sans Pro, Open Sans, Helvetica, sans-serif; font-size: 1.6rem; color: #000; } * { box-sizing: border-box; } .content { margin: 0; padding: 5rem 2rem; } .draggable { max-width: 60rem; margin: 3rem auto; background-color: thistle; position: relative; overflow: hidden; cursor: col-resize; user-select: none; } .draggable.big { font-size: 4rem; } .draggable.nodrag { cursor: default; user-select: none; } .draggable .draggable-wrap { white-space: nowrap; position: relative; left: 0px; } .draggable .draggable-inner { display: inline-block; padding: 1rem 2em; } .draggable:before, .draggable:after { content: ''; display: block; position: absolute; width: 2em; height: 100%; z-index: 10; } .draggable:before { background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjEuMCIgeTE9IjAuNSIgeDI9IjAuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q4YmZkOCIgc3RvcC1vcGFjaXR5PSIwLjgiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkOGJmZDgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background: -webkit-gradient(linear, 100% 50%, 0% 50%, color-stop(0%, rgba(216, 191, 216, 0.8)), color-stop(100%, #d8bfd8)); background: -moz-linear-gradient(right, rgba(216, 191, 216, 0.8), #d8bfd8); background: -webkit-linear-gradient(right, rgba(216, 191, 216, 0.8), #d8bfd8); background: linear-gradient(to left, rgba(216, 191, 216, 0.8), #d8bfd8); border-right: 1px solid #999999; } .draggable:after { right: 0; top: 0; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q4YmZkOCIgc3RvcC1vcGFjaXR5PSIwLjgiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkOGJmZDgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(216, 191, 216, 0.8)), color-stop(100%, #d8bfd8)); background: -m.........完整代码请登录后点击上方下载按钮下载查看
网友评论0