响应式CSS标题|(Responsive CSS Caption | Mouse Over Image)
我想在鼠标悬停图像上显示标题 - 但在移动设备上,标题应位于图像下方。 有任何想法吗? http://jsfiddle.net/X8eCV/2/
@media (max-width:600px) { #caption { display:block; } } #caption { position:relative; color:red; } }
I would like to show caption on mouse over image – but on mobile, the caption should positioned below the image. Any ideas? http://jsfiddle.net/X8eCV/2/
@media (max-width:600px) { #caption { display:block; } } #caption { position:relative; color:red; } }
原文:https://stackoverflow.com/questions/22640950
更新时间:2023-08-09 08:08
最满意答案
找到了答案。 在action方法中,我们可以得到以下参数列表。
$data = $this->getRequest()->getPost();
Found the answer. In the action method we can get the parameter list with following.
$data = $this->getRequest()->getPost();
相关问答
更多-
我们开始前的两点说明: 首先,Model不是一个类,而是一个Layer。 以下代码不是特定于ZF的 要解决您的问题,您可以这样做 public function register() { $this->assertThis($postData); $this->assertThat($postData); // do something with $postData } 方法assertThis和assertThat是你的验证方法,只是不会返回某些内容,它们会抛出一个合适的Exc ...
-
要将POST变量传递给Zend Framework应用程序,只需提交POST请求即可。 您可以通过将表单提交到绑定到控制器操作的URL或通过AJAX请求来执行此操作。 在控制器操作内部工作时,您将使用以下命令获取POST变量: // for the whole POST array $this->getRequest()->getPost(); // for a specific variable $this->getRequest()->getPost('var'); 处理表单时,还有用的是确定请求是 ...
-
在重定向期间传递变量的唯一方法是将查询参数添加到目标路由。 $bar = 'bar'; $this->redirect()->toRoute('myRoute', array(), array( 'query' => array( 'foo' => $bar, ) )); 这将导致/myRoute?foo=bar The only way to pass a variable during a redirect would be to add a query parame ...
-
如何将控制器中的变量传递给Zend Framework中的视图?(How do I pass a variable from a controller to view in Zend Framework?)[2022-04-10]
在你的控制器中: $this->view->myvar = $value 在随后的视图文件中: myvar ?> 但是听起来好像你在加载正确的视图本身时遇到了麻烦? 通常,这是由Controller Action根据命名约定自动配置的。 如果您需要使用备用模板,您可以执行以下操作: $this->render('viewname.phtml') 也许你可以再多说一点,然后告诉我们你得到了什么错误,并在控制器中发布一些你正在做的事情的代码并查看它不起作用。 In your ... -
是的,Zend_Registry可以用于此目的。 您可以做的另一件事是注册预调度控制器插件,它将在任何控制器接收之前将tenantID添加为请求参数: class YourApp_Plugin_IdWriter extends Zend_Controller_Plugin_Abstract { public function preDispatch(Zend_Controller_Request_Abstract $request) { $request->setParam('ten ...
-
在indexAction中,您需要将其分配给视图实例。 简单地做: $this->view->something = "foo"; 并在你看来: something ?> Within indexAction, you need to assign it to the view instance. simply do: $this->view->something = "foo"; and in your view: someth ...
-
找到了答案。 在action方法中,我们可以得到以下参数列表。 $data = $this->getRequest()->getPost(); Found the answer. In the action method we can get the parameter list with following. $data = $this->getRequest()->getPost();
-
也许我正在读错的问题,但你应该能够将$ store移动到构造函数中: public function __construct() { $store = $this->_helper->loadModel('stores'); $store->getByPrimary($storeid); } 并且可以在所有* Action方法中访问它。 使用会话似乎不是很糟糕。 Maybe I'm reading the question wrong, but you should be able to ...
-
你不能导致phtml文件通常处理AFTER控制器方法。 You have to pass variable through AJAX or URL and access variable by using get or post method in controller
-
1)由于这是路由问题,请在module.config.php文件中显示路由的内容。 如果我不得不猜测,您可能没有在配置中正确配置“param”约束。 它应该看起来像这样: 'confirm' => array( 'type' => 'segment', 'options' => array( 'route' => '/controller_name/confirm[/][:param][/]', 'constraints' => array( ...