diff --git a/css/body.css b/css/body.css index 7f70599..8afb26b 100644 --- a/css/body.css +++ b/css/body.css @@ -4,4 +4,25 @@ body, html { padding: 0; font-family: Arial, sans-serif; /* 默认字体 */ background-color:#f4f4f4; -} \ No newline at end of file +} + +/*主内容区test*/ +.container { + width: 60%; + margin: 10% auto 0; + background-color: #f0f0f0; + padding: 2% 5%; + border-radius: 10px +} + +ul { + padding-left: 20px; +} + + ul li { + line-height: 2.3 + } + +a { + color: #20a53a +} \ No newline at end of file diff --git a/index.html b/index.html index 2101e30..b61b9f9 100644 --- a/index.html +++ b/index.html @@ -3,31 +3,8 @@ DreamLife|HomePage - - - - - + + @@ -40,11 +17,15 @@
  • 目前网站工具箱以基本完善
  • 工具箱网站dreamlife.top/toolbox
  • +

    您的当前区域时间

    +

    加载中...

    + + \ No newline at end of file diff --git a/javascape/time.js b/javascape/time.js new file mode 100644 index 0000000..7b748d3 --- /dev/null +++ b/javascape/time.js @@ -0,0 +1,9 @@ +//获取计算机的时间信息 +function updateLocalTime() { + const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; + const now = new Date().toLocaleString('zh-CN', { timeZone: timezone }); + document.getElementById('timeDisplay').innerText = `当前时间 (${timezone}): ${now}`; +} + +setInterval(updateLocalTime, 1000); // 每秒更新时间 +window.onload = updateLocalTime; \ No newline at end of file