vue

添加伪类,hover 有图标显示*

2021-12-08  本文已影响0人  小蜜蜂_1d30

/***添加伪类,hover 有图标显示******/

            tr td:nth-child(1) {

              &::before {

                content: "\21BB";

                position: absolute;

                top: 35%;

                left: 0;

                width: 20px;

                height: 20px;

                display: none;

              }

            }

            tr td:nth-child(1):hover {

              &::before {

                display: flex;

                position: absolute;

              }

            }

/***添加伪类,hover 有图标显示******/

            tr td:nth-child(1) {

              &::before {

                content: "";

                background: url("~@/assets/images/search.png") 0 0 no-repeat;

                position: absolute;

                top: 38%;

                left: 0;

                width: 20px;

                height: 20px;

                display: none;

              }

            }

上一篇 下一篇

猜你喜欢

热点阅读