改变页面鼠标样式(为一个可爱的小图标)

css:{cursor:url('绝对路径'),auto;}//IE,FF,chrome浏览器都可以
前面url是自定义鼠标格式,图像的绝对路径地址,后面的参数是css标准的cursor样式

* {
    cursor: url(https://images2015.cnblogs.com/blog/961272/201607/961272-20160719145928310-806072030.gif), default!important;
   }

比如: 此时鼠标变为了一个图标



作者:AAA前端
链接:https://www.jianshu.com/p/92466c2b1f7b
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
非常感谢您的提问!我很乐意回答这个问题。下面是使用uniapp编写美观带图标的登录页面的示例代码: ```html <template> <view class="login"> <image src="../static/logo.png" class="logo"></image> <view class="form"> <input type="text" placeholder="请输入用户名" class="input"></input> <input type="password" placeholder="请输入密码" class="input"></input> <button class="button">登录</button> </view> </view> </template> <script> export default { data() { return { } }, methods: { } } </script> <style scoped> .login { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; } .logo { width: 200rpx; height: 200rpx; margin-bottom: 40rpx; } .form { display: flex; flex-direction: column; align-items: center; } .input { width: 500rpx; height: 80rpx; border: none; border-radius: 20rpx; margin-bottom: 20rpx; font-size: 32rpx; padding-left: 40rpx; background-color: #f5f5f5; } .button { width: 500rpx; height: 80rpx; border: none; border-radius: 20rpx; background-color: #007aff; color: #fff; font-size: 32rpx; } </style> ``` 上面的代码就是一个简单的使用uniapp编写的美观带图标的登录页面。我们先创建了一个登录页面的容器,并在容器内添加了公司的 logo,然后是一个表单,包括用户名和密码输入框以及登录按钮。在样式方面,我们通过 flex 属性实现了元素的布局和位置调整,同时设定了一些固定的大小和边距,并对边框进行了圆角设计,背景色和字体颜色也进行了配色。如果您有其他问题,我会尽力为您提供更好的答案,谢谢!
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值