Wordpress本地开发环境图像(Wordpress local dev environment image)
我想为wordpress本地环境设置一个图像。 我们有开发人员正在使用Mac,Windows和Linux,我希望设置一个工作环境很容易。
重要的是,他们可以使用VM外部的IDE进行开发,以及GIT。
实现这一目标的最佳途径是什么? Docker还是Vagrant?
我尝试按照本教程这样做,但有一些错误,它不起作用。 https://resources.distilnetworks.com/all-blog-posts/wordpress-development-with-vagrant
有人可以帮忙吗? 问候,Ido
I would like to set an image for wordpress local environment. We have developers that are working with Mac, Windows and Linux and I wish that it will be easy to set a working environment.
It is important that they can use an IDE outside the VM for development, and GIT.
What is the best way to achive that? Docker or Vagrant?
I tried doing so according to this tutorial but there are some stuff wrong with it and it does not working. https://resources.distilnetworks.com/all-blog-posts/wordpress-development-with-vagrant
原文:https://stackoverflow.com/questions/43557400
最满意答案
根据你的评论,在这种情况下,我会使用CSS唯一的方法。 因为你的客户端想要它在Mobile上,所以简单地使父容器位置相对,并使你想要点击的链接绝对具有更高的z-index,并使其填充容器,如下所示:
/*Demo styling */ .Box { height: 200px; width: 200px; background: #f0f0f0; } body > * + * { margin-top: 10px; } /*Suggested styling */ @media screen and (max-width: 1024px) { .Box { position: relative; } .Box .Link { position: absolute; height: 100%; width: 100%; z-index: 2; left: 0; top: 0; } }
<div class="Box"> <img src=../image.jpg> <div class="mask"> <a href="link" class="Link"> <a href="link2"> </div> </div> <div class="Box"> <img src=../image.jpg> <div class="mask"> <a href="link" class="Link"> <a href="link2"> </div> </div> <div class="Box"> <img src=../image.jpg> <div class="mask"> <a href="link" class="Link"> <a href="link2"> </div> </div>
Based on your comment, in that case I would use a CSS only approach. Since your client wants it on Mobile anyways simple make the parent container position relative and make the link you want to be clickable position absolute with a higher z-index and make it fill the container like so:
/*Demo styling */ .Box { height: 200px; width: 200px; background: #f0f0f0; } body > * + * { margin-top: 10px; } /*Suggested styling */ @media screen and (max-width: 1024px) { .Box { position: relative; } .Box .Link { position: absolute; height: 100%; width: 100%; z-index: 2; left: 0; top: 0; } }
<div class="Box"> <img src=../image.jpg> <div class="mask"> <a href="link" class="Link"> <a href="link2"> </div> </div> <div class="Box"> <img src=../image.jpg> <div class="mask"> <a href="link" class="Link"> <a href="link2"> </div> </div> <div class="Box"> <img src=../image.jpg> <div class="mask"> <a href="link" class="Link"> <a href="link2"> </div> </div>
相关问答
更多-
:nth-child(1)应该选择第二个元素,因为你传入的索引是零。 问题是你的选择器包含了
标签,这是不期望的(从我的角度来看)。 HTML: JavaScript的: $('#navigation').chil ... -
n-child没有工作(nth-child not working)[2023-08-28]
如果你使用jquery来设置第n个子节点,只需使用jquery来代替所有内容,而不是使用css块和jquery代码。 看看下面的jsfiddle http://jsfiddle.net/RjGpC/1/ 在以下这一行 #prop-images-wrapper li:nth-child(2n+1), .difcolor { 只需删除li:nth-child(2n+1), if you're using jquery to set the to nth child, just use jquery for e ... -
这里的问题是你实际上是在你的选择器中插入字符'i'而不是使用变量i 。 你应该使用字符串连接,如下所示: for (i = 1; i < 24; i++) { if (dices[i].value == 0) { $('td div:nth-child(' + i + ')').addClass("zero-desktop") } else if (dices[i].value == 1) { $('td div:nth-child(' + i + ')').addClass( ...
-
你可以使用nth-clild , 现场演示 $('.divclass :nth-child(3n)') 对于绑定事件,您可以使用click() 现场演示 $('#divId div:nth-child(3n) a').click(function(){ alert($(this).text()); }); You can use nth-clild, Live Demo $('.divclass :nth-child(3n)') For binding event, you can us ...
-
nth-child循环每个(nth-child looping for each)[2023-09-25]
for循环可能更适合你。 var height = $('.title').height(); var numberDivs = $('.title').children().length; var first = $('.title div:nth-child(1)'); for( var i = 1; i <= numberDivs; i++ ) { var number = current * -height; if( i == 1 ) { first.c ... -
:nth-child()选择器选择第n个子元素,而不管它具有哪个类。 在您的情况下, :nth-child(2)是具有类.l-submain的第一个元素: 要使用.l-submain类选择第二个元素,您必须选择l-main的第三个子元素: .l-main :nth-child(3) { ... } 或者,因为它是.l-main的最后一个孩子: .l-main :last-child { ... } The :nth-child() selector selects the nth chi ...
-
好的,通过在调用:nth-child之前返回css属性来设法使其工作 function makeheight(){ var $sections = $('.section-link'); $sections.filter(function() { return $(this).css('display') == 'block'; }, ':nth-child(3n-2)').each(function () { var $this = $(this), ...
-
与nth-child的css网格(css grid with nth-child)[2023-07-22]
每行有三个项目,因此您需要为每个选择器使用3n 。 然后根据您要定位的元素将其偏移1,2或3: .three-cols > div:nth-child(3n+1) { width: 50%; } .three-cols > div:nth-child(3n+2) { width: 25%; } .three-cols > div:nth-child(3n+3) { width: 25%; } .three-cols > div:nth-child(3n+3) { marg ... -
根据你的评论,在这种情况下,我会使用CSS唯一的方法。 因为你的客户端想要它在Mobile上,所以简单地使父容器位置相对,并使你想要点击的链接绝对具有更高的z-index,并使其填充容器,如下所示: /*Demo styling */ .Box { height: 200px; width: 200px; background: #f0f0f0; } body > * + * { margin-top: 10px; } /*Suggested styling */ @ ...
-
你的选择器应该是以下内容,以便在list标签内解决你的第二个div !! $('#tasklist ul li div:nth-child(2)') 或者,如果您实际上尝试定位列表元素,则应该在标记中列出两个列表元素。 Your selector should be the following in order to address your second div inside the list tag!! $('#tasklist ul li div:nth-child(2)') Or any cas ...