- 博客(26)
- 资源 (2)
- 收藏
- 关注
原创 event.target常用属性
event.target.className //获取事件触发元素classname。event.target.nodeName //获取事件触发元素标签name。event.target.innerHTML //获取事件触发元素的内容。event.target.id //获取事件触发元素id。
2024-04-23 11:49:15
654
原创 Vue中message.split().reverse().join()函数用法
message.split().reverse().join()函数用法
2023-03-14 16:35:41
420
转载 关于overflow:hidden的作用:溢出隐藏、清除浮动、解决外边距塌陷问题
关于overflow:hidden的作用:溢出隐藏、清除浮动、解决外边距塌陷问题
2022-02-24 15:02:50
1540
原创 html+CSS实现背景图加遮罩层,并且将文字定位上去
431、html中将需要加背景图的div(other-product)包裹住定位文字的div(other-product-box)和遮罩层的div(indexInner)2、设置最外边框CSS样式.other-product{ position: relative; background-size: 100%; background-size: 100% 100%; background-repeat: no-repeat; min-height: ..
2022-01-07 16:32:32
2818
原创 html+css实现点击图片缩小或放大
1、html代码 <div class="mainPro-img"> <img class="qqq" src="images/pro1.jpg" alt="" style="width: 100%;"> </div>2、给需要放大或缩小的图片添加联动样式.qqq{ transition: all 0.2s linear;}3、设置图片的hover样式,scale(0.8)代表图片变为原图片的0.8倍,0.2s代表该变化在0.2s
2022-01-07 11:39:08
23183
1
原创 thymeleaf实现透明滚动背景图
1、th:style="'background:transparent url(' + |*{resourcePath}images/background.jpg|+ ') repeat-y fixed 50% 0;'"th:style="'background:transparent url(' + |*{resourcePath}images/background.jpg|+ ') repeat-y fixed 50% 0;'"2、其中最关键字眼是transparent...
2022-01-07 11:30:26
598
原创 swiper插件的使用
1、引入JS源文件并配置翻页 <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/swiper.min.js"></script> <script> var swiper1 = new Swiper('.swiper-containe
2022-01-06 16:14:44
555
原创 使用Thymeleaf设置导航栏选中后高亮
1、首先引入JS,用#thisNav接收后台标记的字段,获取该页面的id,根据class="a-first"取到需高亮导航的id(此id需要根据后台字段获取th:data-id="${nav.id}"),逻辑:若该页面id与选中的导航id一致thisValue == item.dataset.id,则在class="a-first"这个class中追加一个selected样式window.onload = function(){ var thisValue = document.querySe
2022-01-06 16:06:45
1027
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人