跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[Python] Django 后端如何动态设置前端 a 链接的 class 为 select 或 unselect?

发表于

问个 css 问题。如下图所示:人才信息 pkyP6e0.webp

就是当前页面的 a 链接 css 不一样 我看了一个他的源代码: pkyPcwV.webp

就是当首页面的 a 链接 是被选中的 class="select" 其它的链接是:class="unselect"

我是用 django 做后端,前端 如果根据 cate.slug 来判断的话。那有多少个分类就要写多少个 if 语句了 不知道有什么更简单的功能来实现这个问题? 多谢各位

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.