- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我对我网站上的 wordpress 菜单有疑问。如果您以移动分辨率打开我的网站(只需缩小它),您可以看到菜单更改为移动版本,这很好。
我希望 Sneakers + 和 Shop reviews + 链接的行为与其旁边的箭头按钮相同,因此,当移动用户单击 Sneakers + 时,相应的菜单将折叠,就像您点击箭头按钮时一样。
我尝试检查代码,但箭头按钮仅包含以下内容:
<i class="next-level"></i>
网站是 www.nieuwesneakers.nl
在菜单项上使用的正确代码或 href=""是什么?href 现在是“#”,因为它的唯一用途是指示下一级菜单。
提前致谢。
最佳答案
I've looked at your website and am not entirely sure what exactly you are asking. I observe the behaviour on the mobile site (the available arrows and the corresponding behaviour). Where do you want this behaviour to be available to you? Also, are you familiar with Mozilla's Inspector Tool and Chrome Development Tools? If you hit
CNTRL
+SHIFT
+i
in Chrome while on your site, you can do a number of really cool things. The problem with Wordpress, though, is that a lot of the plugins are proprietary and the developers appear to have purposefully mal-structured their code.
上面只是引用我自己的话,所以我可以在答案中对其进行扩展;但是,正如您将看到的,这并不是您问题的真正答案。
Wordpress 就是所谓的内容管理系统(CMS;或 CMA - 助理的“A”)。它旨在让那些没有发布网站所需的编码背景的人可以使用网络具有相同的质量,并且是 Internet 的 Web 2.0 哲学的一部分 - 让全世界都可以访问 Internet。它是一个神奇而强大的工具,它使许多开发人员以更少的工作量赚了很多钱;但是,它经常意味着当人们遇到 CMA 时,他们不确定他们到底在做什么(这种情况并不意味着您是该组的一部分)。
作为动态的一部分,有很多很酷的东西可用,比如菜单 slider 和基于 JQuery 的 UI 等。所有这些都会变得相当复杂,因为网站上充斥着一堆“很酷的东西” .问题是——虽然我们可以访问这些 UI 插件的代码——这些插件的代码是由知道他们在做什么的人编写的(无论是好的还是坏的)。 “好的是他们想为您的网站提供最好的(并且被称为提供周围“最酷的东西”);但是,正如网络开发工具将向您展示的那样,所有(或很多)代码都是提供给你。
那么,插件开发者是如何应对的呢?他们的代码格式错误。直接从您的网站中提取的示例:
请勿编辑以下代码(我知道它的格式很糟糕,这就是重点!)
function simple_tooltip(t,e){jQuery(t).each(function(t){jQuery("body").append("<div class='"+e+"' id='"+e+t+"'>"+jQuery(this).find("span.tooltip-c").html()+"</div>");var i=jQuery("#"+e+t);jQuery(this).removeAttr("title").mouseover(function(){i.css({opacity:1,display:"none"}).fadeIn(400)}).mousemove(function(t){var e,n,o=jQuery(window).scrollTop(),a=jQuery(window).width(),s=15;e=a-2*s>=i.width()+t.pageX?t.pageX+s:a-i.width()-s,n=o+2*s>=t.pageY-i.height()?o+s:t.pageY-i.height()-2.2*s,i.css({left:e,top:n})}).mouseout(function(){i.css({left:"-9999px"})})})}jQuery(document).ready(function(t){if(dtGlobals.isWindowsPhone&&t("body").addClass("ie-mobile"),!t("html").hasClass("old-ie")){dtGlobals.isPhone=!1,dtGlobals.isTablet=!1,dtGlobals.isDesktop=!1;var e=window.getComputedStyle(document.body,":after").getPropertyValue("content");-1!=e.indexOf("phone")&&dtGlobals.isMobile?dtGlobals.isPhone=!0:-1!=e.indexOf("tablet")&&dtGlobals.isMobile?dtGlobals.isTablet=!0:dtGlobals.isDesktop=!0}window.retinizer=function(){if(t("body").hasClass("srcset-enabled")){var e=t("img:not(.retinized)").filter("[srcset]"),i=window.devicePixelRatio?window.devicePixelRatio:1;if(e.each(function(){var e=t(this),n=e.attr("srcset").split(","),o=[],a="";n.forEach(function(e){var i=t.trim(e).split(" ");o[i[1]]=i[0]}),a=i>=1.5?"undefined"!=typeof o["2x"]?o["2x"]:o["1x"]:"undefined"!=typeof o["1x"]?o["1x"]:o["2x"],e.attr("src",a).addClass("retinized")}),"undefined"!=typeof dtGlobals.logoURL){var n=dtGlobals.logoURL.split(","),o=[];n.forEach(function(e){var i=t.trim(e).split(" ");o[i[1]]=i[0]}),dtGlobals.logoURL=i>=1.5?"undefined"!=typeof o["2x"]?o["2x"]:o["1x"]:"undefined"!=typeof o["1x"]?o["1x"]:o["2x"]}}},retinizer();var i;if(dtGlobals.isMobile&&!dtGlobals.isWindowsPhone?t(window).bind("orientationchange",function(){clearTimeout(i),i=setTimeout(function(){t(window).trigger("debouncedresize")},200)}):t(window).on("resize",function(){clearTimeout(i),i=setTimeout(function(){t(window).trigger("debouncedresize")},200)}),!t("html").hasClass("old-ie")){var n=['<g id="social-500px"><path d="M11.969 13.544c1.137 1.3 2.5 2.5 4.3 2.467c2.364 0 3.775-1.795 3.775-4.08 c0-2.279-1.438-3.973-3.756-3.973c-1.848 0-3.059 1.202-4.232 2.621c-1.201-1.44-2.393-2.621-4.279-2.621 C5.477 8 4 9.7 4 12.005c0 2.3 1.6 4 3.8 4.037c1.93-0.08 2.977-1.325 4.117-2.498H11.969z M5.715 12 c0-1.011 0.656-2.114 1.865-2.114c1.233 0 2.5 1.3 3.4 2.137c-0.82 0.957-2.015 1.99-3.265 2 c-1.285-0.021-1.974-0.842-1.974-2.013H5.715z M13.146 12.099c0.867-0.94 1.941-2.123 3.219-2.123c1.246 0 2 0.9 2 2.1 c0 1.104-0.645 2.025-1.876 1.973c-1.333 0.049-2.469-0.879-3.282-1.898L13.146 12.099z"/></g>','<g id="vk"><path d="M12.235 16.191c0.372 0 0.524-0.248 0.516-0.56c-0.017-1.17 0.438-1.797 1.258-0.978 c0.908 0.9 1.1 1.5 2.1 1.502c0.418 0 1.5 0 1.9 0c1.528 0 0.166-1.54-0.916-2.54c-1.024-0.952-1.071-0.979-0.189-2.123 c1.102-1.425 2.535-3.26 1.266-3.26c-0.246 0-0.072 0-2.428 0c-0.471 0-0.501 0.277-0.672 0.7 c-0.604 1.429-1.758 3.28-2.195 3.001c-0.46-0.295-0.248-1.3-0.213-3.038c0.014-0.459 0.01-0.774-0.694-0.94 c-1.92-0.447-3.578 0.431-2.9 0.537c0.954 0.2 0.9 2 0.6 2.98c-0.387 1.558-1.851-1.235-2.457-2.623 C7.25 8.5 7.2 8.3 6.7 8.277c-0.29 0-1.558 0-1.986 0c-0.382 0-0.569 0.177-0.434 0.531c0.133 0.3 1.7 3.8 3.4 5.8 c1.718 1.7 3.4 1.6 4.6 1.597H12.235L12.235 16.191z"/></g>','<g id="tripedvisor"><path fill="none" d="M15.825 9.215c-1.584 0-2.873 1.291-2.873 2.874c0 1.6 1.3 2.9 2.9 2.876s2.873-1.292 2.873-2.876 C18.698 10.5 17.4 9.2 15.8 9.215z M15.879 13.729c-0.423 0-0.82-0.164-1.118-0.464c-0.299-0.301-0.465-0.697-0.465-1.121 c0-0.421 0.166-0.818 0.465-1.119c0.298-0.298 0.695-0.461 1.118-0.461c0.873 0 1.6 0.7 1.6 1.6 C17.464 13 16.8 13.7 15.9 13.729z"/><path
它几乎不可读,这是故意的。这是代码的小部分,全部一行。它使您看到的复制行为难以隔离,更重要的是,除非您真的知道自己在做什么,否则难以复制。
通常情况下,JavaScript(在这种情况下)会经历这个过程 - 称为“缩小” - 以确保代码尽可能减少开销。缩小通常会删除空格、重命名变量等以“丑化代码”——使其在加载时间方面尽可能高效。
关于javascript - Wordpress:使菜单链接的行为与 "more"按钮相同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28645997/
我有一个网站,并且我使用 javascript sdk 添加了“点赞”按钮。 这是代码 (function(d, s, id) { var js, fjs = d.g
我知道 HTML 是逐行读取的。当您链接多个 css 文件(如规范化文件和样式表文件)时,由于 CSS 重要性特异性和源顺序,样式表文件应链接在规范化文件之后。看起来这不会影响链接的 JavaScri
我正在使用官方 Bootstrap site 提供的 CDN 链接在我的网络应用程序中使用面板进行测试 在彻底检查我的代码后,面板没有显示。 但是我在 SO 上看到了类似的帖子并且 CDN 链接不同
这里是编码初学者。我正在尝试为我的移动设备网站设置断点,以便我的网站适合小屏幕。我只是想检查如果我缩小视口(viewport)的宽度,背景颜色是否会改变,但没有发生任何变化。也许我只是对一个简单的错误
举一个我想要的例子,想象一下这个字符串: $text = 'lorem ipsum About us lorem ipsum'; 如果此字符串包含一个 href 以 / 开头的 anchor 链接,则
如何链接到 LaTeX 文档的另一部分或子部分?这种链接的常规范式是什么,像[链接名称]那样写,或者像网页超链接那样写? 最佳答案 链接到另一个部分需要您的部分进行一些额外的标记。要使用的命令是: \
我有一个订单表,其中包含订单号、客户 ID 和代理 ID。然后有一个带有 id 的客户表和一个带有 id 的代理表。 我需要获取所有具有来自代理 ID 'a03' 和代理 ID 'a05' 的订单的客
假设我有: dic = {"z":"zv", "a":"av"} ## Why doesn't the following return a sorted list of keys? keys = d
我在尝试链接到外部库时得到了一些奇怪的结果。如果我从命令行运行以下命令: gcc fftwTest.c -I../extlib/fftw-3.3.5-dll32 -L../extlib/fftw-3.
我认为我没有正确理解 jQuery 链接。我正在遍历一个数组并尝试将 div 元素添加到我的包装器 CSS 类中,每个 div 元素都有一个“click”类和自定义 css top 和 left 属性
HTML 使用超级链接与网络上的另一个文档相连。几乎可以在所有的网页中找到链接。点击链接可以从一张页面跳转到另一张页面。 HTML 超链接(链接) HTML使用标签 a 来设置超文本链接。 超链
这个问题在这里已经有了答案: How do I link to part of a page? (hash?) (7 个答案) Scroll Automatically to the Bottom
我想创建一个 Docker Swarm 集群,运行一个 Elasticsearch 实例、一个 MongoDB 实例和一个 grails 应用程序,每个都在单独的机器上。我正在使用 Docker Ma
我正在尝试将 CakePHP HTML Linker 用于以下代码 Add Cuisine 由于 span 标签需要在 a 标签内。我无法根据需要获得输出。关于如何完成它的任何建议? 最佳答案 禁用链
大家好, 我最近开发了一个应用程序,很快就会提交到 App Store。我想免费提交这个应用程序,并想知道我是否可以实现一个带有 PayPal 捐赠标志的按钮,上面基本上写着“捐赠用于开发”或与此相关
我想尝试在 dlang 中使用 libuv。我下载了这样的 dlang 绑定(bind): git clone git@github.com:tamediadigital/libuv.git 现在我接
我有一个节点(节点 a),各种其他节点(节点 b/c/d/e)与之引用。 我可以创建一个带有参数的 View 作为我正在查看的节点(节点 a),并获取引用该节点的节点列表。 基本上在节点 a 查看节点
我正在尝试建立一个常见问题页面,上面有目录,下面有答案。我想点击目录中的一个问题,并在同一页面上链接到相应的答案。我如何在 CakePHP 中使用 $this->Html->link() 执行此操作方
在 WooCommerce 3.0+ 中,我使用 js 创建了一些选项卡,每个选项卡中包含来自不同类别的产品。我已经设法修改了简单产品的添加到购物车链接,其中点击了 addtocart 按钮它进入下一
Delphi 2007/2009 奇怪的问题在这里: 根据设计时定义的组件属性,是否可以在链接中包含文件或保留文件? 示例:如果我将 SomeProperty 保留为真,则在编译时,单元 SomeUn
我是一名优秀的程序员,十分优秀!