diff --git a/index.html b/index.html index c587e07..eaacafe 100644 --- a/index.html +++ b/index.html @@ -23,6 +23,7 @@ align-content: center; opacity: 0.05; transform: rotate(-45deg); + padding-top: 60px; /* 为固定的搜索框留出空间 */ } code { display: block; @@ -55,10 +56,46 @@ p, li { font-size: 14px; } + .search-container { + position: fixed; + top: 10px; + left: 10px; + background: #fff; + padding: 5px; + border: 1px solid #ccc; + border-radius: 4px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); + z-index: 1000; /* 确保搜索框在最上层 */ + } + .search-container input { + padding: 5px; + width: 200px; /* 设置宽度 */ + border: 1px solid #ccc; + border-radius: 4px; + } + .search-results { + margin-top: 5px; + max-width: 200px; + border: 1px solid #ccc; + border-radius: 4px; + background: #f9f9f9; + display: none; + } + .search-results div { + padding: 5px; + cursor: pointer; + } + .search-results div:hover { + background: #e0e0e0; + }
+