7月第四周

7.24

CSS3 属性之 transform & translation

transform:

transform属性
transform属性

translation:

transition 属性是一个简写属性,用于设置四个过渡属性:

  • transition-property
  • transition-duration
  • transition-timing-function
  • transition-delay

JQuery获取当前窗口信息

方法解释输出
window.location.href设置或获取整个 URL 为字符串。http://localhost:8086/topic/index?topicId=361
window.location.pathname设置或获取对象指定的文件名或路径。/topic/index
window.location.port设置或获取与 URL 关联的端口号码。8086
window.location.protocol设置或获取 URL 的协议部分。http:
window.location.hash设置或获取 href 属性中在井号“#”后面的分段。
window.location.host设置或获取 location 或 [URL]。http:localhost:8086
window.location.search设置或获取 href 属性中跟在问号后面的部分。?topicId=361

以这个网址为例  http://localhost:8086/topic/index?topicId=361

方法解释输出
window.location.href设置或获取整个 URL 为字符串。http://localhost:8086/topic/index?topicId=361
window.location.pathname设置或获取对象指定的文件名或路径。/topic/index
window.location.port设置或获取与 URL 关联的端口号码。8086
window.location.protocol设置或获取 URL 的协议部分。http:
window.location.hash设置或获取 href 属性中在井号“#”后面的分段。
window.location.host设置或获取 location 或 [URL]。http:localhost:8086
window.location.search设置或获取 href 属性中跟在问号后面的部分。?topicId=361

7.28

  • vue加载swiper 初始化会默认滑到最后一个slider-item
    可以用setTimeOut解决,延迟swiper的初始化
  • vue动态数据加载的元素无法在DOM树中查找到,不能直接使用addClass来实现点击的active,此时可以结合v-bind:class来实现,
    例如使用V-for循环加载数据时,可以通过获取点击节点的index来实现添加active
在Java中,你可以通过`Calendar`类来判断某个日期属于本的第几周。以下是一个具体的操作步骤: 1. 创建一个`Calendar`实例,并设置到你想查询的日期。 2. 使用`get(Calendar.DAY_OF_WEEK)`方法获取该日期是星期几,这会返回一个`int`值,其中1代表星期日,2代表星期一,以此类推。 3. 使用`get(Calendar.DAY_OF_MONTH)`方法获取该日期是本的第几天。 4. 根据获取的星期几和日期,计算该日期是本的第几周。 以下是一个简单的示例代码: ```java import java.util.Calendar; public class WeekOfTheMonth { public static void main(String[] args) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DAY_OF_MONTH, 15); // 假设我们要找的是本15号是第几周 int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH); int weekOfMonth = 0; switch(dayOfWeek) { case Calendar.MONDAY: weekOfMonth = (dayOfMonth + 5) / 7; break; case Calendar.TUESDAY: weekOfMonth = (dayOfMonth + 4) / 7; break; case Calendar.WEDNESDAY: weekOfMonth = (dayOfMonth + 3) / 7; break; case Calendar.THURSDAY: weekOfMonth = (dayOfMonth + 2) / 7; break; case Calendar.FRIDAY: weekOfMonth = (dayOfMonth + 1) / 7; break; case Calendar.SATURDAY: case Calendar.SUNDAY: weekOfMonth = dayOfMonth / 7; break; } System.out.println("本的第 " + weekOfMonth + " 周。"); } } ``` 这段代码会输出本的第几周。注意,这里假设一周的第一天是星期一,并且按照向上取整的方式来计算周数。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值