这里我有一些CSS:
#image-edges-beneath:hover{
background-color: blue;
}
#image-edges:hover{
background-color: blue;
}
#image-edges-beneat:hover:after{
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
border: 2px solid #F1FD6D;
}
#image-edges:hover:after{
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
border: 2px solid #F1FD6D;
}
Run Code Online (Sandbox Code Playgroud)
但这不起作用.唯一发生的事情是背景颜色有一个过渡,而我希望它只在悬停时改变,而边框我想要一个过渡,所以基本上边框渐渐变成颜色,而背景颜色在悬停时立即改变颜色.这就是我想要完成的,但这不起作用.:(任何想法用户?
名为Carly的用户未注册并到达索引页面.她注册并自动重定向到主仪表板页面.现在名为CarlyCoolness123的用户Carly关闭了她的浏览器并去吃晚餐.她再次登上她的电脑,但这一次,因为她只记得实际的索引页面:coolness.com,而不是coolness.com/index-dashboard.如果用户已登录,我希望此用户自动重定向到仪表板页面.这意味着如果用户已登录,则用户无法访问索引页.如何执行此操作?我尝试了几件事,但是因为我认为你们这里的人比我更了解这个我认为我的错误不需要包含在这里.
几个小时以来我一直在为一些非常愚蠢的事情而苦苦挣扎。没有哗众取宠,直奔主题。当我将其粘贴到我的 posts#index 页面视图文件中时:
<p><%= link_to "log out", destroy_user_session_path, :method => :delete %></p>
Run Code Online (Sandbox Code Playgroud)
并在浏览器中单击它,用户成功退出。然而...
当我在其他地方执行此操作(例如用户登录后或用户注册后)时,用户会尝试从我们可以称为 users#index 的页面注销。然后,只有在单击注销按钮时才会出现此错误。
Unknown action
The action 'show' could not be found for UsersController
Run Code Online (Sandbox Code Playgroud)
我已经尝试了很多东西,jquery和jquer.uls或者其他东西都包含在application.js文件中,
这些是我的路线,我认为它们是正确的。
Proxima::Application.routes.draw do
devise_for :users
resources :users
resources :dashboard
resources :posts
authenticated :user do
root :to => 'dashboard#index'
end
resources :welcome
devise_for :users
resources :users
resources :dashboard
resources :posts
root :to => 'welcome#index'
end
Run Code Online (Sandbox Code Playgroud)
这太愚蠢了,我不明白这里发生了什么,我一次又一次地收到这条愚蠢的消息,但仍然没有任何事情发生。然后我决定在 UsersController 中实际写下“show”操作,但是......当我写入redirect_towelcome_path时它不会注销,我通过再次实际访问根url来检查......有什么想法吗?
html{
background: url(/assets/flower.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Run Code Online (Sandbox Code Playgroud)
如何使此代码从选定数量的图片中随机选择作为背景.我正在使用Rails 3,所以请记住,如果这将简化使这项工作的过程.谢谢!:d