MWI Item Favorites Manager && Quickly Switch Characters

Added a favorite button to the item menu and 4 characters buttons to the main page.

< Feedback on MWI Item Favorites Manager && Quickly Switch Characters

Review: Good - script works

§
Posted: 2025-05-07

优化了一下按钮的 ui
// 创建四个按钮
for (let i = 0; i < 4; i++) {
const button = document.createElement('a');
button.textContent = buttonTexts[i];
button.href = buttonLinks[i];
button.style.padding = '4px 8px';// 减小内边距
button.style.backgroundColor = 'rgba(48, 63, 159, 0.3)';// 半透明背景
button.style.color = 'rgba(255, 255, 255, 0.9)';// 半透明文字
button.style.border = '1px solid rgba(255, 255, 255, 0.2)';// 添加细边框
button.style.borderRadius = '3px';
button.style.fontSize = '12px';// 减小字体
button.style.backdropFilter = 'blur(2px)';// 背景模糊效果
button.style.boxShadow = '0 1px 3px rgba(0,0,0,0.1)';// 更柔和的阴影

// 调整悬停效果
button.addEventListener('mouseover', function() {
this.style.backgroundColor = 'rgba(26, 35, 126, 0.5)';
this.style.boxShadow = '0 2px 5px rgba(0,0,0,0.2)';
});
button.addEventListener('mouseout', function() {
this.style.backgroundColor = 'rgba(48, 63, 159, 0.3)';
this.style.boxShadow = '0 1px 3px rgba(0,0,0,0.1)';
});

buttonContainer.appendChild(button);
}

Post reply

Sign in to post a reply.

长期地址
遇到问题?请前往 GitHub 提 Issues。