{"id":59175,"date":"2025-04-23T10:19:39","date_gmt":"2025-04-23T02:19:39","guid":{"rendered":"https:\/\/fwq.ai\/blog\/59175\/"},"modified":"2025-04-23T10:19:39","modified_gmt":"2025-04-23T02:19:39","slug":"ecshop%e7%ba%afdivcss%e5%ae%9e%e7%8e%b0%e4%ba%ac%e4%b8%9c%e5%95%86%e5%9f%8e%e5%88%86%e7%b1%bb%ef%bc%88%e4%b8%8d%e9%9c%80jquery%ef%bc%89%e9%80%82%e5%90%88","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/59175\/","title":{"rendered":"ecshop\u7eafDIV+CSS\u5b9e\u73b0\u4eac\u4e1c\u5546\u57ce\u5206\u7c7b\uff08\u4e0d\u9700jquery\uff09\u9002\u5408"},"content":{"rendered":"<p><strong><font>\u7b2c\u4e00\u6b65\uff1a<\/font><\/strong>\u5728\u4f60\u6240\u7528\u7684<span>\u6a21\u677f<\/span>\u7684css<span>\u6587\u4ef6<\/span>\u4e2d\u52a0\u4e0a\u4ee5\u4e0b\u4ee3\u7801<\/p>\n<p>.my_left_category{<br \/> width:211px;<br \/> font-size:12px; <br \/> }<\/p>\n<p> .my_left_category h1{<br \/> background-image:url(images\/spring_06.jpg);<br \/> height:20px;<br \/> background-repeat:no-repeat;<br \/> font-size:14px;<br \/> font-weight:bold;<br \/> padding-left:15px;<br \/> padding-top:8px;<br \/> margin:0px;<br \/> color:#FFF;<br \/> }<\/p>\n<p>.my_left_category .my_left_cat_list{<br \/> width:209px;<br \/> border-color:#ce2020;<br \/> border-style:solid;<br \/> border-width:0px 1px 1px 1px;<br \/> line-height:13.5pt;<br \/> }<br \/> .my_left_category .my_left_cat_list h2 {<br \/> margin:0px;<br \/> padding:3px 5px 0px 9px;<br \/> }<br \/> .my_left_category .my_left_cat_list h2 a{<br \/> color:#d6290b;<br \/> font-weight:bold;<br \/> font-size:14px;<br \/> line-height:22px;<br \/> }<\/p>\n<p>.my_left_category .h2_cat{<br \/> width:209px;<br \/> height:26px; <br \/> background-image:url(images\/my_menubg.gif);<br \/> background-repeat:no-repeat; <br \/> line-height:26px;<br \/> font-weight:normal;<br \/> color:#333333;<br \/> position:relative;<br \/> }<\/p>\n<p>.my_left_category a{<br \/> font:12px;<br \/> text-decoration:none;<br \/> color:#333333;<br \/> }<br \/> .my_left_category a:hover{<br \/> text-decoration:underline;<br \/> color:#ff3333;<br \/> }<\/p>\n<p>.my_left_category h3{<br \/> margin:0px; <br \/> padding:0px;<br \/> height:26px; <br \/> font-size:12px; <br \/> font-weight:normal;<br \/> display:block; <br \/> padding-left:8px;<br \/> }<br \/> .my_left_category h3 span{color:#999999; width:145px; float:right;}<br \/> .my_left_category h3 a{ line-height:26px;}<\/p>\n<p>.my_left_category .h3_cat{<br \/> display:none;<br \/> width:204px;<br \/> position:absolute; <br \/> left:184px; <br \/> margin-top:-26px; <br \/> cursor:auto;<br \/> }<\/p>\n<p>.my_left_category .shadow{<br \/> position:inherit;<br \/> background:url(images\/shadow_04.gif) left top;<br \/> width:204px;<br \/> }<\/p>\n<p>.my_left_category .shadow_border{<br \/> position:inherit; <br \/> width:200px; <br \/> border:1px solid #959595; margin-top:1px; <br \/> border-left-width:0px; <br \/> background:url(images\/shadow_border.gif) no-repeat 0px 21px; <br \/> background-color:#ffffff; <br \/> margin-bottom:3px<br \/> }<br \/> .my_left_category .shadow_border ul{margin:0; padding:0; margin-left:15px}<br \/> .my_left_category .shadow_border ul li {<br \/> list-style:none;<br \/> padding-left:10px;<br \/> background-image:url(images\/my_cat_sub_menu_dot.gif);<br \/> background-repeat:no-repeat;<br \/> background-position:0px 8px;<br \/> float:left;<br \/> width:75px;<br \/> height:26px;<br \/> overflow:hidden;<br \/> }<\/p>\n<p>.my_left_category .active_cat{ z-index:99;background-position:0 -25px;cursor:pointer;}<br \/> .my_left_category .active_cat h3 { font-weight:bold}<br \/> .my_left_category .active_cat h3 span{ display:none;} <br \/> .my_left_category .active_cat div{display:block;}<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><font>\u7b2c\u4e8c\u6b65\uff1a<\/font><\/strong>\u6a21\u677f\u6587\u4ef6\u5939\u7684library\/category_tree.lbi\u5185\u5bb9\u6539\u4e3a\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=gbk&#8221;&gt;<br \/> &lt;div class=&#8221;my_left_category&#8221;&gt;<br \/> &lt;h1&gt;\u5546\u54c1\u5206\u7c7b&lt;\/h1&gt;<br \/> &lt;div class=&#8221;my_left_cat_list&#8221;&gt;<br \/> {assign var=&#8221;pre_item_level&#8221; value=-1}<br \/> &lt;!&#8211;{foreach from=cat_list(0,0,false,3,false) item=cat}&#8211;&gt;<br \/> {if $cat.level lt 2 &amp;&amp; $pre_item_level gt 0}<br \/> &lt;\/ul&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;<br \/> {\/if}<\/p>\n<p>{if $cat.level eq 0}<br \/> &lt;h2&gt;&lt;a href=&#8221;{$cat.url}&#8221;&gt;{$cat.name|escape:html}&lt;\/a&gt;&lt;\/h2&gt;<br \/> {elseif $cat.level eq 1}<br \/> &lt;div class=&#8221;h2_cat&#8221; onmouseover=&#8221;this.className=&#8217;h2_cat active_cat'&#8221; onmouseout=&#8221;this.className=&#8217;h2_cat'&#8221;&gt;<br \/> &lt;h3&gt;&lt;SPAN&gt; &#8211; {$cat.cat_desc|escape:html}&lt;\/SPAN&gt;&lt;a href=&#8221;{$cat.url}&#8221;&gt;{$cat.name|escape:html}&lt;\/a&gt;&lt;\/h3&gt;<br \/> &lt;div class=&#8221;h3_cat&#8221;&gt;<br \/> &lt;div class=&#8221;shadow&#8221;&gt;<br \/> &lt;div class=&#8221;shadow_border&#8221;&gt;<br \/> &lt;ul&gt; <br \/> {elseif $cat.level eq 2}<br \/> &lt;li&gt;&lt;a href=&#8221;{$cat.url}&#8221;&gt;{$cat.name|escape:html}&lt;\/a&gt;&lt;\/li&gt;<br \/> {\/if}<\/p>\n<p>{assign var=&#8221;pre_item_level&#8221; value=$cat.level}<br \/> &lt;!&#8211;{\/foreach}&#8211;&gt;<br \/> {if $pre_item_level gt 0}<br \/> &lt;\/ul&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;<br \/> {\/if}<\/p>\n<p>&lt;\/div&gt;<br \/> &lt;\/div&gt;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><font>\u7b2c\u4e09\u6b65\uff1a<\/font><\/strong>\u628a\u7528\u5230\u7684\u56fe\u7247\u62f7\u8d1d\u5230\u6587\u4ef6\u5939\u7684images<span>\u76ee\u5f55<\/span><br \/> ok\u5b8c\u6210\uff01<\/p>\n<p> \u6ce8\uff1a<br \/> \u4eac\u4e1c\u7684\u4e8c\u7ea7<strong><font>\u5206\u7c7b<\/font><\/strong>\u540d\u79f0\u65c1\u8fb9\u5217\u4e862\u4e2a\u4e09\u7ea7<strong><font>\u5206\u7c7b<\/font><\/strong>\u540d\u79f0\uff08\u7070\u8272\uff09,\u4f5c\u4e3a\u4e09\u7ea7<strong><font>\u5206\u7c7b<\/font><\/strong>\u7684<span>\u63d0\u793a<\/span>\u3002\u53c2\u8003\u5176\u4ed6\u7f51\u53cb\u7684\u505a\u6cd5\uff0c\u8fd9\u91cc\u4f7f\u7528\u4e8c\u7ea7\u7c7b\u7684<span>\u63cf\u8ff0<\/span>\u5b57\u6bb5cat_desc\u6765\u5b9e\u73b0,\u3010\u7528<span>\u7a0b\u5e8f<\/span>\u53bb\u8c03\u53d6\u4e8c\u7ea7\u7c7b\u4e0b\u7684\u524d\u4e24\u4e2a\u4e09\u7ea7<strong><font>\u5206\u7c7b<\/font><\/strong>\u5b8c\u5168\u662f\u5316\u7b80\u4e3a\u70e6\u7684\u4e8b\u60c5\u3002\u3011\u4f46\u8fd9\u4e2a\u6548\u679c\u8981\u4fee\u6539 \/includes\/lib_common.php \u624d\u751f\u6548\u7684\uff0c\u5f53\u7136\uff0c<font>\u4e0d\u4fee\u6539\u4e5f\u4e0d\u4f1a\u51fa\u9519\uff0c\u53ea\u662f\u6ca1\u6709\u663e\u793a\u7f62\u4e86<\/font>\u3002<\/p>\n<p> <font>\u4fee\u6539\u65b9\u6cd5\uff1a<\/font>\u5728\/includes\/lib_common.php \u7684cat_list\u51fd\u6570\u4e2d\u627e\u5230<br \/> $sql = &#8220;SELECT c.cat_id, c.cat_name,<br \/> \u4fee\u6539\u4e3a<br \/> $sql = &#8220;SELECT c.cat_id, c.cat_name, c.cat_desc,<\/p>\n<p> \u8865\u5145\u4e00\u4e0b\uff1a<br \/> \u5728firefox\u7b49\u6d4f\u89c8\u5668\u4e2d\uff0c\u5982\u679c\u5c55\u5f00\u7684\u90e8\u5206\u88ab\u906e\u6321\uff08\u7531\u4e8e\u7236\u7ea7\u5bb9\u5668overflow:hidden\u5f15\u8d77\uff09\uff0c\u5728.my_left_category\u7684\u6837\u5f0f\u4e2d\u52a0\u4e0a position:absolute\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u6b65\uff1a\u5728\u4f60\u6240\u7528\u7684\u6a21\u677f\u7684css\u6587\u4ef6\u4e2d\u52a0\u4e0a\u4ee5\u4e0b\u4ee3\u7801 .my_left_category{ width:211px; font-size:12px; } .my_left_category h1{ background-image:url(images\/spring_06.jpg); height:20px; background-repeat:no-repeat; font-size:14px; font-weight:bold; padding-left:15px; padding-top:8px; margin:0px; color:#FFF; } .my_left_category .my_left_cat_list{ width:209px; border-color:#ce2020; border-style:solid; border-width:0px 1px 1px 1px; line-height:13.5pt; } .my_left_category .my_left_cat_list h2 { margin:0px; padding:3px 5px 0px 9px; } .my_left_category .my_left_cat_list h2 a{ color:#d6290b; font-weight:bold; font-size:14px; line-height:22px; } .my_left_category .h2_cat{ width:209px; height:26px; background-image:url(images\/my_menubg.gif); background-repeat:no-repeat; line-height:26px; font-weight:normal; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-59175","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=59175"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/59175\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=59175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=59175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=59175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}